public override string ToString() { if (string.IsNullOrWhiteSpace(MessageType)) { return($"{CreatedUtc.ToString("dd-MM-yyyy HH:mm:ss")} | {Message} | {StackTrace}"); } return($"{CreatedUtc.ToString("dd-MM-yyyy HH:mm:ss")} | {MessageType} | {Message} | {StackTrace}"); }
protected bool Equals(LogEvent other) { return(String.Equals(Id, other.Id, StringComparison.InvariantCultureIgnoreCase) && String.Equals(CompanyId, other.CompanyId, StringComparison.InvariantCultureIgnoreCase) && String.Equals(Message, other.Message, StringComparison.InvariantCultureIgnoreCase) && Value == other.Value && CreatedUtc.Equals(other.CreatedUtc)); }
public override int GetHashCode() { unchecked { var hashCode = (Id != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(Id) : 0); hashCode = (hashCode * 397) ^ (CompanyId != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(CompanyId) : 0); hashCode = (hashCode * 397) ^ (Message != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(Message) : 0); hashCode = (hashCode * 397) ^ Value; hashCode = (hashCode * 397) ^ CreatedUtc.GetHashCode(); return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = Owner?.GetHashCode() ?? 0; hashCode = (hashCode * 397) ^ CreatedUtc.GetHashCode(); hashCode = (hashCode * 397) ^ ModifiedUtc.GetHashCode(); hashCode = (hashCode * 397) ^ PublishedUtc.GetHashCode(); hashCode = (hashCode * 397) ^ Container; return(hashCode); } }
protected bool Equals(Employee other) { return(String.Equals(Id, other.Id, StringComparison.InvariantCultureIgnoreCase) && String.Equals(CompanyId, other.CompanyId, StringComparison.InvariantCultureIgnoreCase) && String.Equals(CompanyName, other.CompanyName, StringComparison.InvariantCultureIgnoreCase) && String.Equals(Name, other.Name, StringComparison.InvariantCultureIgnoreCase) && Age == other.Age && YearsEmployed == other.YearsEmployed && CreatedUtc.Equals(other.CreatedUtc) && UpdatedUtc.Equals(other.UpdatedUtc) && Version == other.Version); }
/// <summary> /// Human-readable string version of the object. /// </summary> /// <returns></returns> public override string ToString() { string ret = "--- DedupeObject ---" + Environment.NewLine + " Key : " + Key + Environment.NewLine + " Length : " + Length + Environment.NewLine + " CreatedUtc : " + CreatedUtc.ToString() + Environment.NewLine + " Chunks : " + Chunks.Count + Environment.NewLine + " ObjectMap : " + ObjectMap.Count; return(ret); }
public bool Equals(Customers other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(Id == other.Id && string.Equals(FirstName, other.FirstName) && string.Equals(LastName, other.LastName) && CreatedUtc.Equals(other.CreatedUtc) && Age == other.Age && Amount == other.Amount && Deleted == other.Deleted && string.Equals(Version, other.Version)); }
public override int GetHashCode() { unchecked { var hashCode = Id; hashCode = (hashCode * 397) ^ (FirstName != null ? FirstName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (LastName != null ? LastName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ CreatedUtc.GetHashCode(); hashCode = (hashCode * 397) ^ Age; hashCode = (hashCode * 397) ^ Amount.GetHashCode(); hashCode = (hashCode * 397) ^ Deleted.GetHashCode(); hashCode = (hashCode * 397) ^ (Version != null ? Version.GetHashCode() : 0); return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = (Id != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(Id) : 0); hashCode = (hashCode * 397) ^ (CompanyId != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(CompanyId) : 0); hashCode = (hashCode * 397) ^ (CompanyName != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(CompanyName) : 0); hashCode = (hashCode * 397) ^ (Name != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(Name) : 0); hashCode = (hashCode * 397) ^ Age; hashCode = (hashCode * 397) ^ YearsEmployed; hashCode = (hashCode * 397) ^ CreatedUtc.GetHashCode(); hashCode = (hashCode * 397) ^ UpdatedUtc.GetHashCode(); hashCode = (hashCode * 397) ^ Version.GetHashCode(); return(hashCode); } }
public bool Equals(Common other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(string.Equals(Owner, other.Owner) && CreatedUtc.Equals(other.CreatedUtc) && ModifiedUtc.Equals(other.ModifiedUtc) && PublishedUtc.Equals(other.PublishedUtc) && Container == other.Container); }
//////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Indicates whether the current object is equal to another object of the same type. /// </summary> /// /// <param name="other"> An object to compare with this object. </param> /// /// <returns> /// true if the current object is equal to the <paramref name="other">other</paramref> parameter; /// otherwise, false. /// </returns> //////////////////////////////////////////////////////////////////////////////////////////////////// public bool Equals(Motorcycle other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(Id == other.Id && TenantId == other.TenantId && IsDeleted == other.IsDeleted && string.Equals(Make, other.Make, StringComparison.CurrentCulture) && string.Equals(Model, other.Model, StringComparison.CurrentCulture) && Year == other.Year && string.Equals(Vin, other.Vin, StringComparison.CurrentCulture) && CreatedUtc.Equals(other.CreatedUtc) && ModifiedUtc.Equals(other.ModifiedUtc)); }
public override int GetHashCode() { int result = 17; unchecked { if (ParentFolderIndex != default(int)) { result = (result * 31) + ParentFolderIndex.GetHashCode(); } if (Name != default(string)) { result = (result * 31) + Name.GetHashCode(); } if (LastModifiedUtc != default(DateTime)) { result = (result * 31) + LastModifiedUtc.GetHashCode(); } if (CreatedUtc != default(DateTime)) { result = (result * 31) + CreatedUtc.GetHashCode(); } if (Attributes != default(System.IO.FileAttributes)) { result = (result * 31) + Attributes.GetHashCode(); } if (Length != default(long)) { result = (result * 31) + Length.GetHashCode(); } } return(result); }