Beispiel #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));
        }
Beispiel #2
0
 public virtual object Clone()
 {
     lock (this.SyncRoot)
     {
         ChoDictionary <TKey, TValue> clonedObject = new ChoDictionary <TKey, TValue>(this);
         return(clonedObject);
     }
 }
 internal ChoReadOnlyDictionary(ChoDictionary <TKey1, TValue1> dictionary)
 {
     _dictionary = dictionary;
 }
Beispiel #4
0
 internal ChoFixedDictionary(ChoDictionary <TKey1, TValue1> dictionary)
 {
     _dictionary = dictionary;
 }
 internal ChoSynchronizedDictionary(ChoDictionary <TKey1, TValue1> dictionary, object syncObject)
 {
     this._dictionary = dictionary;
     this._syncRoot   = syncObject;
 }
 internal ChoSynchronizedDictionary(ChoDictionary <TKey1, TValue1> dictionary)
     : this(dictionary, dictionary.SyncRoot)
 {
 }
Beispiel #7
0
 internal ChoUniqueDictionary(ChoDictionary <TKey1, TValue1> dictionary)
 {
     _dictionary = dictionary;
 }
Beispiel #8
0
 public static ChoDictionary <TKey, TValue> ReadOnly(ChoDictionary <TKey, TValue> dictionary)
 {
     ChoGuard.ArgumentNotNull(dictionary, "Dictionary");
     return(new ChoReadOnlyDictionary <TKey, TValue>(dictionary));
 }
Beispiel #9
0
 public static ChoDictionary <TKey, TValue> Fixed(ChoDictionary <TKey, TValue> dictionary)
 {
     ChoGuard.ArgumentNotNull(dictionary, "Dictionary");
     return(new ChoFixedDictionary <TKey, TValue>(dictionary));
 }