コード例 #1
0
 /// <summary> 
 /// Computes and retrieves a hash code for an object. 
 /// </summary> 
 /// <remarks> 
 /// This method implements the <see cref="Object">Object</see> method. 
 /// </remarks> 
 /// <returns>A hash code for an object.</returns>
 public override int GetHashCode()
 {
     return(Id.GetHashCode() + Culture.GetHashCode() + ExternalId.GetHashCode() + SeqNum.GetHashCode()
            + Name.GetHashCode()
            + DescriptionShort.GetHashCode()
            + TranslatedFromId.GetHashCode());
 }
コード例 #2
0
 /// <summary>
 /// Equality method between two objects of the same type.
 /// Because the Equals method is strongly typed by generic constraints,
 /// it is not necessary to test for the correct object type.
 /// For safety we just want to match on business key value - in this case the fields
 /// that cannot be different between the two objects if they are supposedly equal.
 /// </summary>
 /// <param name="obj">The other object of this type that we are testing equality with</param>
 /// <returns></returns>
 public virtual bool Equals(GetAdminOutputDtoBase <TIdType> obj)
 {
     if (obj != null)
     {
         return(Id.Equals(obj.Id) && Culture.Equals(obj.Culture) &&
                TranslatedFromId.Equals(obj.TranslatedFromId) &&
                IsActive.Equals(obj.IsActive) &&
                IsDeleted.Equals(obj.IsDeleted) &&
                DescriptionFull.Equals(obj.DescriptionFull) &&
                CreationTime.Equals(obj.CreationTime) &&
                CreatorUserId.Equals(obj.CreatorUserId) &&
                CreatorUserName.Equals(obj.CreatorUserName) &&
                LastModifierUserId.Equals(obj.LastModifierUserId) &&
                LastModifierUserName.Equals(obj.LastModifierUserName) &&
                LastModificationTime.Equals(obj.LastModificationTime)
                );
     }
     return(false);
 }
コード例 #3
0
 /// <summary>
 /// Equality method between two objects of the same type.
 /// Because the Equals method is strongly typed by generic constraints,
 /// it is not necessary to test for the correct object type.
 /// For safety we just want to match on business key value - in this case the fields
 /// that cannot be different between the two objects if they are supposedly equal.
 /// </summary>
 /// <param name="obj">The other object of this type that we are testing equality with</param>
 /// <returns></returns>
 public virtual bool Equals(CreateUpdateInputDtoBase <TIdType> obj)
 {
     if (obj != null)
     {
         return(Id.Equals(obj.Id) && Culture.Equals(obj.Culture) &&
                DescriptionShort.Equals(obj.DescriptionShort) && Name.Equals(obj.Name) && TranslatedFromId.Equals(obj.TranslatedFromId)
                );
     }
     return(false);
 }