Exemplo n.º 1
0
 /// <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());
     }
 }
Exemplo n.º 2
0
        /// <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);
        }
Exemplo n.º 3
0
 /// <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));
 }
Exemplo n.º 4
0
        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);
        }