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