public TestProduct(string name, string description) { if (string.IsNullOrWhiteSpace(Id)) { Id = Guid.NewGuid().ToString(); } Name = name; Description = description; Stamp = new Stamp( new AuditUser("users/1", "User 1", "CreatedBy"), new AuditUser("users/2", "User 2", "CreatedOnBehalfOf"), DateTimeOffset.Now, new AuditUser("users/3", "User 3", "LastModifiedBy"), new AuditUser("users/4", "User 4", "LastModifiedOnBehalfOf"), DateTimeOffset.Now); }
public bool Equals(Stamp <TId> other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(EqualityComparer <TId> .Default.Equals(createdBy, other.createdBy) && EqualityComparer <TId> .Default.Equals(createdOnBehalfOf, other.createdOnBehalfOf) && createdTimestamp.Equals(other.createdTimestamp) && EqualityComparer <TId> .Default.Equals(lastModifiedBy, other.lastModifiedBy) && EqualityComparer <TId> .Default.Equals(lastModifiedOnBehalfOf, other.lastModifiedOnBehalfOf) && lastModifiedTimestamp.Equals(other.lastModifiedTimestamp)); }