public DifferentialStateEnumerator(TDifferentialStoreComponent <TKey, TValue, TKeyComparer, TKeyEqualityComparer, TKeyRangePartitioner> component) { this.Component = component; IEnumerable <KeyValuePair <TKey, TVersionedItem <TValue> > > enumerable; this.Component.TryEnumerateKeyAndValue(out enumerable); this.sortedEnumerator = enumerable.GetEnumerator(); }
public void AppendToDeltaDifferentialState(TDifferentialStoreComponent <TKey, TValue, TKeyComparer, TKeyEqualityComparer, TKeyRangePartitioner> deltaState) { Diagnostics.Assert(deltaState != null, this.traceType, "Delta state cannot be null"); // Avoid incrementing index beore insertion. int localIndex = this.index; bool add = this.deltaDifferentialStateList.TryAdd(++localIndex, deltaState); Diagnostics.Assert(add, this.traceType, "Failed to add index {0} to differential list", localIndex); this.index = localIndex; }