Пример #1
0
 /// <summary>
 ///     <para>Overriden. Serves as a hash function for a particular type.</para>
 /// </summary>
 /// <returns>
 ///     <para>A hash code for the current <see cref="ObjectDependency"/>.</para>
 /// </returns>
 public override int GetHashCode()
 {
     if (CustomDependency != null)
     {
         return(0x3f12d876 ^ CustomDependency.GetHashCode());
     }
     return(Utility.CombineHashCodes(Reference.GetHashCode(),
                                     LastUpdatedDate.GetHashCode(), Type.GetHashCode()));
 }
Пример #2
0
 /// <summary>
 ///     <para>Indicates whether the current object is equal to another object of the same type.</para>
 /// </summary>
 /// <returns>
 ///     <para>true if the current object is equal to the <paramref name="other"/> parameter; otherwise, false.</para>
 /// </returns>
 /// <param name="other">
 ///     <para>An object to compare with this object.</para>
 /// </param>
 public bool Equals(ObjectDependency other)
 {
     if (other == null)
     {
         return(false);
     }
     return(Utility.AreEqualled(CustomDependency, other.CustomDependency) &&
            Utility.AreEqual(Reference, other.Reference) &&
            LastUpdatedDate.Equals(other.LastUpdatedDate) &&
            Type.Equals(other.Type));
 }