public override int GetHashCode() { unchecked { var hashCode = (PartitionKey != null ? PartitionKey.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (RowKey != null ? RowKey.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Timestamp.GetHashCode(); hashCode = (hashCode * 397) ^ Cost.GetHashCode(); hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Purchased.GetHashCode(); hashCode = (hashCode * 397) ^ Count; hashCode = (hashCode * 397) ^ GlobalGuid.GetHashCode(); hashCode = (hashCode * 397) ^ Awesomeness.GetHashCode(); return(hashCode); } }
protected bool Equals(Purchase other) { // intentionally leaves out Timestamp (changed by server) return(string.Equals(PartitionKey, other.PartitionKey) && string.Equals(RowKey, other.RowKey) && Cost.Equals(other.Cost) && string.Equals(Name, other.Name) && Purchased.Equals(other.Purchased) && Count == other.Count && GlobalGuid.Equals(other.GlobalGuid) && Awesomeness.Equals(other.Awesomeness)); }