コード例 #1
0
ファイル: ORSet.cs プロジェクト: lulzzz/Eventuate.NET
            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.");
                }
            }
コード例 #2
0
ファイル: ORCart.cs プロジェクト: lulzzz/Eventuate.NET
 /// <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));