コード例 #1
0
ファイル: RentalAgreementRate.cs プロジェクト: Kiesum/hets
        /// <summary>
        /// Returns true if RentalAgreementRate instances are equal
        /// </summary>
        /// <param name="other">Instance of RentalAgreementRate to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(RentalAgreementRate other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id.Equals(other.Id)
                     ) &&
                 (
                     RentalAgreement == other.RentalAgreement ||
                     RentalAgreement != null &&
                     RentalAgreement.Equals(other.RentalAgreement)
                 ) &&
                 (
                     ComponentName == other.ComponentName ||
                     ComponentName != null &&
                     ComponentName.Equals(other.ComponentName)
                 ) &&
                 (
                     IsAttachment == other.IsAttachment ||
                     IsAttachment != null &&
                     IsAttachment.Equals(other.IsAttachment)
                 ) &&
                 (
                     Rate == other.Rate ||
                     Rate != null &&
                     Rate.Equals(other.Rate)
                 ) &&
                 (
                     PercentOfEquipmentRate == other.PercentOfEquipmentRate ||
                     PercentOfEquipmentRate != null &&
                     PercentOfEquipmentRate.Equals(other.PercentOfEquipmentRate)
                 ) &&
                 (
                     RatePeriod == other.RatePeriod ||
                     RatePeriod != null &&
                     RatePeriod.Equals(other.RatePeriod)
                 ) &&
                 (
                     Comment == other.Comment ||
                     Comment != null &&
                     Comment.Equals(other.Comment)
                 ) &&
                 (
                     TimeRecords == other.TimeRecords ||
                     TimeRecords != null &&
                     TimeRecords.SequenceEqual(other.TimeRecords)
                 ));
        }
コード例 #2
0
            public override bool Equals(object otherObject)
            {
                if (otherObject is AttributeUpdate)
                {
                    var otherUpdate = otherObject as AttributeUpdate;
                    return(EntityGuid.Equals(otherUpdate.EntityGuid) &&
                           ComponentName.Equals(otherUpdate.ComponentName) &&
                           AttributeName.Equals(otherUpdate.AttributeName) &&
                           NewValue.Equals(otherUpdate.NewValue));
                }

                return(false);
            }
コード例 #3
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }
            if (!(obj is VersionInfo))
            {
                return(false);
            }
            var other = (VersionInfo)obj;

            return(ComponentName.Equals(other.ComponentName) &&
                   Major == other.Major &&
                   Minor == other.Minor &&
                   Build == other.Build &&
                   Revision == other.Revision &&
                   IsContract == other.IsContract);
        }