public PNCounterDictionary <TKey> MergeDelta(ORDictionary <TKey, PNCounter> .IDeltaOperation delta) { switch (delta) { case PNCounterDictionaryDelta d: return(new PNCounterDictionary <TKey>(Underlying.MergeDelta(d.Underlying))); default: return(new PNCounterDictionary <TKey>(Underlying.MergeDelta(delta))); } }
public ORMultiValueDictionary <TKey, TValue> MergeDelta(ORDictionary <TKey, ORSet <TValue> > .IDeltaOperation delta) { if (_withValueDeltas) { return(new ORMultiValueDictionary <TKey, TValue>(Underlying.MergeDeltaRetainingDeletedValues(delta), _withValueDeltas)); } else { return(new ORMultiValueDictionary <TKey, TValue>(Underlying.MergeDelta(delta), _withValueDeltas)); } }
public PNCounterDictionaryDelta(ORDictionary <TKey, PNCounter> .IDeltaOperation underlying) { Underlying = underlying; if (underlying is IReplicatedDeltaSize s) { DeltaSize = s.DeltaSize; } else { DeltaSize = 1; } }
public ORMultiValueDictionaryDelta(ORDictionary <TKey, ORSet <TValue> > .IDeltaOperation underlying) { Underlying = underlying; if (underlying is IReplicatedDeltaSize s) { DeltaSize = s.DeltaSize; } else { DeltaSize = 1; } }
public bool Equals(ORDictionary <TKey, ORSet <TValue> > .IDeltaOperation other) { if (other is ORDictionary <TKey, ORSet <TValue> > .DeltaGroup group) { if (Underlying is ORDictionary <TKey, ORSet <TValue> > .DeltaGroup ourGroup) { return(ourGroup.Operations.SequenceEqual(group.Operations)); } if (group.Operations.Length == 1) { return(Underlying.Equals(group.Operations.First())); } return(false); } return(Underlying.Equals(other)); }
public PNCounterDictionary(ORDictionary <TKey, PNCounter> underlying) { _underlying = underlying; }
public PNCounterDictionary <TKey> MergeDelta(ORDictionary <TKey, PNCounter> .IDeltaOperation delta) => new PNCounterDictionary <TKey>(_underlying.MergeDelta(delta));
internal ORMultiValueDictionary(ORDictionary <TKey, ORSet <TValue> > underlying, bool withValueDeltas) { Underlying = underlying; _withValueDeltas = withValueDeltas; }
public ORMultiDictionary(ORDictionary<TKey, ORSet<TValue>> underlying) { _underlying = underlying; }