PageRenderTime 42ms CodeModel.GetById 16ms 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
Possible License(s): BSD-3-Clause, GPL-2.0
  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. // * Executes the showconfig command and dumps the results
  8. // *
  9. // ***********************
  10. void Main()
  11. {
  12. foreach (var section in Client.Configuration.Sections)
  13. {
  14. Client.Configuration
  15. .Where(e => e.Section == section)
  16. .Select(e => new { e.Name, e.Value })
  17. .Dump(section);
  18. }
  19. }