Ejemplo n.º 1
0
        public static ChoDictionary <TKey, TValue> Synchronized(ChoDictionary <TKey, TValue> dictionary, object syncObject)
        {
            ChoGuard.ArgumentNotNull(dictionary, "Dictionary");
            ChoGuard.ArgumentNotNull(syncObject, "SyncObject");

            return(new ChoSynchronizedDictionary <TKey, TValue>(dictionary, syncObject));
        }
Ejemplo n.º 2
0
 public virtual object Clone()
 {
     lock (this.SyncRoot)
     {
         ChoDictionary <TKey, TValue> clonedObject = new ChoDictionary <TKey, TValue>(this);
         return(clonedObject);
     }
 }
Ejemplo n.º 3
0
 internal ChoReadOnlyDictionary(ChoDictionary <TKey1, TValue1> dictionary)
 {
     _dictionary = dictionary;
 }
Ejemplo n.º 4
0
 internal ChoFixedDictionary(ChoDictionary <TKey1, TValue1> dictionary)
 {
     _dictionary = dictionary;
 }
Ejemplo n.º 5
0
 internal ChoSynchronizedDictionary(ChoDictionary <TKey1, TValue1> dictionary, object syncObject)
 {
     this._dictionary = dictionary;
     this._syncRoot   = syncObject;
 }
Ejemplo n.º 6
0
 internal ChoSynchronizedDictionary(ChoDictionary <TKey1, TValue1> dictionary)
     : this(dictionary, dictionary.SyncRoot)
 {
 }
Ejemplo n.º 7
0
 internal ChoUniqueDictionary(ChoDictionary <TKey1, TValue1> dictionary)
 {
     _dictionary = dictionary;
 }
Ejemplo n.º 8
0
 public static ChoDictionary <TKey, TValue> ReadOnly(ChoDictionary <TKey, TValue> dictionary)
 {
     ChoGuard.ArgumentNotNull(dictionary, "Dictionary");
     return(new ChoReadOnlyDictionary <TKey, TValue>(dictionary));
 }
Ejemplo n.º 9
0
 public static ChoDictionary <TKey, TValue> Fixed(ChoDictionary <TKey, TValue> dictionary)
 {
     ChoGuard.ArgumentNotNull(dictionary, "Dictionary");
     return(new ChoFixedDictionary <TKey, TValue>(dictionary));
 }