Пример #1
0
        public MultiValueRegister <T> Updated(MultiValueRegister <T> crdt, object operation, DurableEvent e)
        {
            if (operation is SetOp <T> )
            {
                return(crdt.Set(((SetOp <T>)operation).Value, e.VectorTimestamp, e.SystemTimestamp, e.EmitterId));
            }

            return(crdt);
        }
Пример #2
0
 public IImmutableSet <T> GetValue(MultiValueRegister <T> crdt)
 {
     return(crdt.Value.ToImmutableHashSet());
 }
Пример #3
0
 public object Updating(MultiValueRegister <T> crdt, object operation)
 {
     return(operation);
 }
Пример #4
0
 public LastWriteWinsRegister(MultiValueRegister <T> register = null)
 {
     this.register = register ?? MultiValueRegister <T> .Operations.Default;
 }