AcUtils
A high performance abstraction layer for AccuRev
RepoElement.cs
Go to the documentation of this file.
1 
16 using System;
17 using System.Configuration;
18 
19 namespace AcUtils
20 {
24  [Serializable]
25  public sealed class RepoElement : ConfigurationElement
26  {
27  private static ConfigurationProperty _server;
28  private static ConfigurationProperty _port;
29  private static ConfigurationPropertyCollection _properties;
30 
31  static RepoElement()
32  {
33  _server = new ConfigurationProperty("server", typeof(string),
34  null, ConfigurationPropertyOptions.IsRequired);
35  _port = new ConfigurationProperty("port", typeof(int),
36  5050, ConfigurationPropertyOptions.IsRequired);
37 
38  _properties = new ConfigurationPropertyCollection();
39  _properties.Add(_server);
40  _properties.Add(_port);
41  }
42 
47  [ConfigurationProperty("server", DefaultValue = "", IsKey = true, IsRequired = true)]
48  public string Server
49  {
50  get { return (string)base[_server]; }
51  }
52 
57  [ConfigurationProperty("port", IsKey = false, IsRequired = true)]
58  public int Port
59  {
60  get { return (int)base[_port]; }
61  }
62 
63  protected override ConfigurationPropertyCollection Properties
64  {
65  get { return _properties; }
66  }
67  }
68 }
int Port
The port from a server-port pair in .exe.config.
Definition: RepoElement.cs:59
string Server
The server from a server-port pair in .exe.config.
Definition: RepoElement.cs:49
An AccuRev repository server-port pair in .exe.config.
Definition: RepoElement.cs:25