/// <inheritdoc/> public bool Equals(LWWRegister <T> other) { if (ReferenceEquals(other, null)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(Timestamp == other.Timestamp && UpdatedBy == other.UpdatedBy && Equals(Value, other.Value)); }
/// <summary> /// TBD /// </summary> /// <param name="other">TBD</param> /// <returns>TBD</returns> public LWWRegister <T> Merge(LWWRegister <T> other) { if (other.Timestamp > Timestamp) { return(other); } if (other.Timestamp < Timestamp) { return(this); } if (other.UpdatedBy.Uid < UpdatedBy.Uid) { return(other); } return(this); }