示例#1
0
        /// <summary>
        /// Returns true if AddressesModel2 instances are equal
        /// </summary>
        /// <param name="other">Instance of AddressesModel2 to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(AddressesModel2 other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     AddressId == other.AddressId ||
                     AddressId != null &&
                     AddressId.Equals(other.AddressId)
                     ) &&
                 (
                     Nickname == other.Nickname ||
                     Nickname != null &&
                     Nickname.Equals(other.Nickname)
                 ) &&
                 (
                     CountryId == other.CountryId ||
                     CountryId != null &&
                     CountryId.Equals(other.CountryId)
                 ) &&
                 (
                     Zip == other.Zip ||
                     Zip != null &&
                     Zip.Equals(other.Zip)
                 ) &&
                 (
                     City == other.City ||
                     City != null &&
                     City.Equals(other.City)
                 ) &&
                 (
                     AdministrativeArea == other.AdministrativeArea ||
                     AdministrativeArea != null &&
                     AdministrativeArea.Equals(other.AdministrativeArea)
                 ) &&
                 (
                     DependentLocality == other.DependentLocality ||
                     DependentLocality != null &&
                     DependentLocality.Equals(other.DependentLocality)
                 ) &&
                 (
                     SortingCode == other.SortingCode ||
                     SortingCode != null &&
                     SortingCode.Equals(other.SortingCode)
                 ) &&
                 (
                     Organization == other.Organization ||
                     Organization != null &&
                     Organization.Equals(other.Organization)
                 ) &&
                 (
                     AddressLine1 == other.AddressLine1 ||
                     AddressLine1 != null &&
                     AddressLine1.Equals(other.AddressLine1)
                 ) &&
                 (
                     AddressLine2 == other.AddressLine2 ||
                     AddressLine2 != null &&
                     AddressLine2.Equals(other.AddressLine2)
                 ) &&
                 (
                     IsPrimary == other.IsPrimary ||
                     IsPrimary != null &&
                     IsPrimary.Equals(other.IsPrimary)
                 ) &&
                 (
                     SessionToken == other.SessionToken ||
                     SessionToken != null &&
                     SessionToken.Equals(other.SessionToken)
                 ));
        }
示例#2
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (AddressId != null)
         {
             hashCode = hashCode * 59 + AddressId.GetHashCode();
         }
         if (Nickname != null)
         {
             hashCode = hashCode * 59 + Nickname.GetHashCode();
         }
         if (CountryId != null)
         {
             hashCode = hashCode * 59 + CountryId.GetHashCode();
         }
         if (Zip != null)
         {
             hashCode = hashCode * 59 + Zip.GetHashCode();
         }
         if (City != null)
         {
             hashCode = hashCode * 59 + City.GetHashCode();
         }
         if (AdministrativeArea != null)
         {
             hashCode = hashCode * 59 + AdministrativeArea.GetHashCode();
         }
         if (DependentLocality != null)
         {
             hashCode = hashCode * 59 + DependentLocality.GetHashCode();
         }
         if (SortingCode != null)
         {
             hashCode = hashCode * 59 + SortingCode.GetHashCode();
         }
         if (Organization != null)
         {
             hashCode = hashCode * 59 + Organization.GetHashCode();
         }
         if (AddressLine1 != null)
         {
             hashCode = hashCode * 59 + AddressLine1.GetHashCode();
         }
         if (AddressLine2 != null)
         {
             hashCode = hashCode * 59 + AddressLine2.GetHashCode();
         }
         if (IsPrimary != null)
         {
             hashCode = hashCode * 59 + IsPrimary.GetHashCode();
         }
         if (SessionToken != null)
         {
             hashCode = hashCode * 59 + SessionToken.GetHashCode();
         }
         return(hashCode);
     }
 }
示例#3
0
        /// <summary>
        /// Returns true if MultibranchPipeline instances are equal
        /// </summary>
        /// <param name="other">Instance of MultibranchPipeline to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(MultibranchPipeline other)
        {
            if (ReferenceEquals(null, other)) return false;
            if (ReferenceEquals(this, other)) return true;

            return 
                (
                    DisplayName == other.DisplayName ||
                    DisplayName != null &&
                    DisplayName.Equals(other.DisplayName)
                ) && 
                (
                    EstimatedDurationInMillis == other.EstimatedDurationInMillis ||
                    EstimatedDurationInMillis != null &&
                    EstimatedDurationInMillis.Equals(other.EstimatedDurationInMillis)
                ) && 
                (
                    LatestRun == other.LatestRun ||
                    LatestRun != null &&
                    LatestRun.Equals(other.LatestRun)
                ) && 
                (
                    Name == other.Name ||
                    Name != null &&
                    Name.Equals(other.Name)
                ) && 
                (
                    Organization == other.Organization ||
                    Organization != null &&
                    Organization.Equals(other.Organization)
                ) && 
                (
                    WeatherScore == other.WeatherScore ||
                    WeatherScore != null &&
                    WeatherScore.Equals(other.WeatherScore)
                ) && 
                (
                    BranchNames == other.BranchNames ||
                    BranchNames != null &&
                    BranchNames.SequenceEqual(other.BranchNames)
                ) && 
                (
                    NumberOfFailingBranches == other.NumberOfFailingBranches ||
                    NumberOfFailingBranches != null &&
                    NumberOfFailingBranches.Equals(other.NumberOfFailingBranches)
                ) && 
                (
                    NumberOfFailingPullRequests == other.NumberOfFailingPullRequests ||
                    NumberOfFailingPullRequests != null &&
                    NumberOfFailingPullRequests.Equals(other.NumberOfFailingPullRequests)
                ) && 
                (
                    NumberOfSuccessfulBranches == other.NumberOfSuccessfulBranches ||
                    NumberOfSuccessfulBranches != null &&
                    NumberOfSuccessfulBranches.Equals(other.NumberOfSuccessfulBranches)
                ) && 
                (
                    NumberOfSuccessfulPullRequests == other.NumberOfSuccessfulPullRequests ||
                    NumberOfSuccessfulPullRequests != null &&
                    NumberOfSuccessfulPullRequests.Equals(other.NumberOfSuccessfulPullRequests)
                ) && 
                (
                    TotalNumberOfBranches == other.TotalNumberOfBranches ||
                    TotalNumberOfBranches != null &&
                    TotalNumberOfBranches.Equals(other.TotalNumberOfBranches)
                ) && 
                (
                    TotalNumberOfPullRequests == other.TotalNumberOfPullRequests ||
                    TotalNumberOfPullRequests != null &&
                    TotalNumberOfPullRequests.Equals(other.TotalNumberOfPullRequests)
                ) && 
                (
                    Class == other.Class ||
                    Class != null &&
                    Class.Equals(other.Class)
                );
        }