internal Enumerator(SerializableDictionaryGameObject dictionary) { this.dictionary = dictionary; version = dictionary.version; index = 0; currentValue = default(ReplaceResData); }
internal Enumerator(SerializableDictionaryGameObject dictionary) { this.dictionary = dictionary; version = dictionary.version; index = 0; currentKey = default(string); }
public KeyCollection(SerializableDictionaryGameObject dictionary) { if (dictionary == null) { throw new ArgumentNullException("dictionary"); } this.dictionary = dictionary; }
internal Enumerator(SerializableDictionaryGameObject dictionary, int getEnumeratorRetType) { this.dictionary = dictionary; version = dictionary.version; index = 0; this.getEnumeratorRetType = getEnumeratorRetType; current = new KeyValuePair <string, ReplaceResData>(); }
public void TrimExcess() { var newDict = new SerializableDictionaryGameObject(Count, true); // fast copy for (int i = 0; i < count; i++) { if (entriesHashCode[i] >= 0) { newDict.Add(entriesKey[i], entriesValue[i]); } } // copy internal field to this this.buckets = newDict.buckets; this.count = newDict.count; this.entriesHashCode = newDict.entriesHashCode; this.entriesKey = newDict.entriesKey; this.entriesNext = newDict.entriesNext; this.entriesValue = newDict.entriesValue; this.freeCount = newDict.freeCount; this.freeList = newDict.freeList; }