public ORSet <T> Effect(ORSet <T> crdt, object operation, DurableEvent e) { switch (operation) { case AddOp add: return(crdt.Add((T)add.Entry, e.VectorTimestamp)); case RemoveOp rem: return(crdt.Remove(rem.Timestamps)); default: throw new NotSupportedException($"ORSet doesn't support [{operation.GetType().FullName}] operation."); } }
/// <summary> /// Removes all <see cref="ORCartEntry"/>s identified by given <paramref name="timestamps"/> and returns an updated <see cref="ORCart{T}"/>. /// </summary> public ORCart <T> Remove(ImmutableHashSet <VectorTime> timestamps) => new ORCart <T>(inner.Remove(timestamps));