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

            return
                ((
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                     ) &&
                 (
                     Sha == other.Sha ||
                     Sha != null &&
                     Sha.Equals(other.Sha)
                 ) &&
                 (
                     Class == other.Class ||
                     Class != null &&
                     Class.Equals(other.Class)
                 ) &&
                 (
                     Repo == other.Repo ||
                     Repo != null &&
                     Repo.Equals(other.Repo)
                 ) &&
                 (
                     Size == other.Size ||
                     Size != null &&
                     Size.Equals(other.Size)
                 ) &&
                 (
                     Owner == other.Owner ||
                     Owner != null &&
                     Owner.Equals(other.Owner)
                 ) &&
                 (
                     Path == other.Path ||
                     Path != null &&
                     Path.Equals(other.Path)
                 ) &&
                 (
                     Base64Data == other.Base64Data ||
                     Base64Data != null &&
                     Base64Data.Equals(other.Base64Data)
                 ));
        }
        public bool Equals(Pipeline p)
        {
            // If parameter is null, return false.
            if (Object.ReferenceEquals(p, null))
            {
                return(false);
            }

            // Optimization for a common success case.
            if (Object.ReferenceEquals(this, p))
            {
                return(true);
            }

            // If run-time types are not exactly the same, return false.
            if (this.GetType() != p.GetType())
            {
                return(false);
            }

            return(Sha.Equals(p.Sha));
        }