/// <summary> /// Returns a hash code for this instance. /// </summary> /// <returns>A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.</returns> public override int GetHashCode() { unchecked { return((PersistentId.GetHashCode() * 397) ^ TempId.GetHashCode()); } }
/// <summary> /// Returns a <see cref="System.String" /> that represents this instance. /// </summary> /// <returns>A <see cref="System.String" /> that represents this instance.</returns> public override string ToString() { if (PersistentId != default(int)) { return(PersistentId.ToString()); } if (TempId != default(Guid)) { return(TempId.ToString()); } return(string.Empty); }
/// <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" /> parameter; otherwise, false.</returns> public bool Equals(ComplexId other) { return((PersistentId == other.PersistentId) && TempId.Equals(other.TempId)); }
public XElement ToXml() { XElement result = new XElement("Temp"); YellowstonePathology.Business.Domain.Persistence.SerializationHelper.Serialize(result, "TempId", TempId.ToString()); YellowstonePathology.Business.Domain.Persistence.SerializationHelper.Serialize(result, "TempDate", TempDate); YellowstonePathology.Business.Domain.Persistence.SerializationHelper.Serialize(result, "Hello", Hello.ToString()); return(result); }