Пример #1
0
        /// <summary>
        /// Returns true if RepositoryBranch instances are equal
        /// </summary>
        /// <param name="other">Instance of RepositoryBranch to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(RepositoryBranch other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     ProgramId == other.ProgramId ||
                     ProgramId != null &&
                     ProgramId.Equals(other.ProgramId)
                     ) &&
                 (
                     RepositoryId == other.RepositoryId ||

                     RepositoryId.Equals(other.RepositoryId)
                 ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     Links == other.Links ||
                     Links != null &&
                     Links.Equals(other.Links)
                 ));
        }
Пример #2
0
        /// <summary>
        /// Returns true if PipelinePhase instances are equal
        /// </summary>
        /// <param name="other">Instance of PipelinePhase to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(PipelinePhase other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                     ) &&
                 (
                     Type == other.Type ||

                     Type.Equals(other.Type)
                 ) &&
                 (
                     RepositoryId == other.RepositoryId ||
                     RepositoryId != null &&
                     RepositoryId.Equals(other.RepositoryId)
                 ) &&
                 (
                     Branch == other.Branch ||
                     Branch != null &&
                     Branch.Equals(other.Branch)
                 ) &&
                 (
                     EnvironmentId == other.EnvironmentId ||
                     EnvironmentId != null &&
                     EnvironmentId.Equals(other.EnvironmentId)
                 ));
        }