PageRenderTime 22ms CodeModel.GetById 19ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/Examples/011 - Show client configuration through object model.linq

#
Unknown | 21 lines | 19 code | 2 blank | 0 comment | 0 complexity | 99525e683db195182afecb0a568b5da8 MD5 | raw file
 1<Query Kind="Program">
 2  <Reference Relative="..\Mercurial.Net\bin\Debug\Mercurial.NET.dll">C:\Dev\VS.NET\Mercurial.Net\Mercurial.Net\bin\Debug\Mercurial.NET.dll</Reference>
 3  <Namespace>Mercurial</Namespace>
 4</Query>
 5
 6// *****************************************************
 7// *
 8// * Executes the showconfig command and dumps the results
 9// *
10// ***********************
11
12void Main()
13{
14    foreach (var section in Client.Configuration.Sections)
15    {
16        Client.Configuration
17            .Where(e => e.Section == section)
18            .Select(e => new { e.Name, e.Value })
19            .Dump(section);
20    }
21}