internal Enumerator(DictionaryULong <TValue> dictionary) { this.dictionary = dictionary; this.version = dictionary.version; this.index = 0; this.currentValue = default(TValue); }
public static void Copy <T, TCopy>(DictionaryULong <T> fromDic, ref DictionaryULong <T> dic, TCopy copy) where TCopy : IArrayElementCopy <T> { if (fromDic == null) { if (dic != null) { foreach (var kv in dic) { copy.Recycle(kv.Value); } PoolDictionaryULong <T> .Recycle(ref dic); } dic = null; return; } if (dic == null || fromDic.Count != dic.Count) { if (dic != null) { foreach (var kv in dic) { copy.Recycle(kv.Value); } PoolDictionaryULong <T> .Recycle(ref dic); } dic = PoolDictionaryULong <T> .Spawn(fromDic.Count); } dic.CopyFrom(fromDic, copy); }
public static void Copy <T>(DictionaryULong <T> fromDic, ref DictionaryULong <T> dic) { if (fromDic == null) { if (dic != null) { PoolDictionaryULong <T> .Recycle(ref dic); } dic = null; return; } if (dic == null || fromDic.Count != dic.Count) { if (dic != null) { PoolDictionaryULong <T> .Recycle(ref dic); } dic = PoolDictionaryULong <T> .Spawn(fromDic.Count); } dic.CopyFrom(fromDic); }
public KeyCollection(DictionaryULong <TValue> dictionary) { if (dictionary == null) { ThrowHelper.ThrowArgumentNullException(ExceptionArgument.dictionary); } this.dictionary = dictionary; }
internal Enumerator(DictionaryULong <TValue> dictionary, int getEnumeratorRetType) { this.dictionary = dictionary; this.version = dictionary.version; this.index = 0; this.getEnumeratorRetType = getEnumeratorRetType; this.current = new KeyValuePair <TKey, TValue>(); }
public static void Recycle(ref DictionaryULong <TValue> dic) { Pools.current.PoolRecycle(ref dic); }