AcUtils
A high performance abstraction layer for AccuRev
DomainElement.cs
Go to the documentation of this file.
1 
16 using System;
17 using System.Configuration;
18 
19 namespace AcUtils
20 {
25  [Serializable]
26  public sealed class DomainElement : ConfigurationElement
27  {
28  private static ConfigurationProperty _host;
29  private static ConfigurationProperty _path;
30  private static ConfigurationPropertyCollection _properties;
31 
32  static DomainElement()
33  {
34  _host = new ConfigurationProperty("host", typeof(string),
35  null, ConfigurationPropertyOptions.IsRequired);
36  _path = new ConfigurationProperty("path", typeof(string),
37  null, ConfigurationPropertyOptions.IsRequired);
38 
39  _properties = new ConfigurationPropertyCollection();
40  _properties.Add(_host);
41  _properties.Add(_path);
42  }
43 
48  [ConfigurationProperty("host", DefaultValue = "", IsKey = true, IsRequired = true)]
49  public string Host
50  {
51  get { return (string)base[_host]; }
52  }
53 
58  [ConfigurationProperty("path", DefaultValue = "", IsKey = false, IsRequired = true)]
59  public string Path
60  {
61  get { return (string)base[_path]; }
62  }
63 
64  protected override ConfigurationPropertyCollection Properties
65  {
66  get { return _properties; }
67  }
68  }
69 }
An Active Directory domain element host-path pair from .exe.config.
string Host
The host from a host-path pair in .exe.config.
string Path
The path from a host-path pair in .exe.config.