AcUtils
A high performance abstraction layer for AccuRev
PropCollection.cs
Go to the documentation of this file.
1 
16 using System;
17 using System.Configuration;
18 
19 namespace AcUtils
20 {
25 
53  [ConfigurationCollection(typeof(PropElement),
54  CollectionType=ConfigurationElementCollectionType.AddRemoveClearMap)]
55  [Serializable]
56  public sealed class PropCollection : ConfigurationElementCollection
57  {
58  private static ConfigurationPropertyCollection _properties;
59  static PropCollection()
60  {
61  _properties = new ConfigurationPropertyCollection();
62  }
63 
64  public PropCollection() { }
65 
66  protected override ConfigurationPropertyCollection Properties
67  {
68  get { return _properties; }
69  }
70 
71  public override ConfigurationElementCollectionType CollectionType
72  {
73  get { return ConfigurationElementCollectionType.AddRemoveClearMap; }
74  }
75 
76  public PropElement this[int index]
77  {
78  get { return (PropElement)base.BaseGet(index); }
79  set
80  {
81  if (base.BaseGet(index) != null)
82  {
83  base.BaseRemoveAt(index);
84  }
85  base.BaseAdd(index, value);
86  }
87  }
88 
89  new public PropElement this[string key]
90  {
91  get
92  {
93  return (PropElement)BaseGet(key);
94  }
95  }
96 
97  protected override ConfigurationElement CreateNewElement()
98  {
99  return new PropElement();
100  }
101 
102  protected override object GetElementKey(ConfigurationElement element)
103  {
104  return (element as PropElement).Field;
105  }
106  }
107 }
An Active Directory user property element field-title pair from .exe.config. These are user properties not in the regular default set.
Definition: PropElement.cs:29
The list of Active Directory user property field-title pairs from .exe.config. These are user properties not in the regular default set.