예제 #1
0
 public bool Equals(AppEngineHttpRequest other)
 {
     if (ReferenceEquals(other, null))
     {
         return(false);
     }
     if (ReferenceEquals(other, this))
     {
         return(true);
     }
     if (HttpMethod != other.HttpMethod)
     {
         return(false);
     }
     if (!object.Equals(AppEngineRouting, other.AppEngineRouting))
     {
         return(false);
     }
     if (RelativeUri != other.RelativeUri)
     {
         return(false);
     }
     if (!Headers.Equals(other.Headers))
     {
         return(false);
     }
     if (Body != other.Body)
     {
         return(false);
     }
     return(Equals(_unknownFields, other._unknownFields));
 }
예제 #2
0
        public void EqualsTakesInASecondaryHeadersAndReturnsFalseWhenTheyContainDifferentInformation()
        {
            var testHeaders = new Headers("testOne", "One")
                              .AddHeader("testTwo", "Two");

            var testHeadersToCompare = new Headers("headerOne", "One")
                                       .AddHeader("testTwo", "Two");

            Assert.False(testHeaders.Equals(testHeadersToCompare));
        }
예제 #3
0
        public void EqualsTakesInASecondaryHeadersAndReturnsTrueWhenTheyContainTheSameInformation()
        {
            var testHeaders = new Headers("testOne", "One")
                              .AddHeader("testTwo", "Two");

            var testHeadersToCompare = new Headers("testOne", "One")
                                       .AddHeader("testTwo", "Two");

            Assert.True(testHeaders.Equals(testHeadersToCompare));
        }
예제 #4
0
 /// <summary>
 /// Returns a value indicating whether this instance is equal to the specified <see cref="NntpArticle"/> value.
 /// </summary>
 /// <param name="other">A <see cref="NntpArticle"/> object to compare to this instance.</param>
 /// <returns>true if <paramref name="other" /> has the same value as this instance; otherwise, false.</returns>
 public bool Equals(NntpArticle other)
 {
     if ((object)other == null)
     {
         return(false);
     }
     return
         (Number.Equals(other.Number) &&
          MessageId.Equals(other.MessageId) &&
          Headers.Equals(other.Headers) &&
          Body.SequenceEqual(other.Body));
 }
 public bool Equals(MiniRequestObject other)
 {
     if (ReferenceEquals(other, null))
     {
         return(false);
     }
     if (ReferenceEquals(other, this))
     {
         return(true);
     }
     if (!Headers.Equals(other.Headers))
     {
         return(false);
     }
     if (!SetHeaders.Equals(other.SetHeaders))
     {
         return(false);
     }
     if (!deleteHeaders_.Equals(other.deleteHeaders_))
     {
         return(false);
     }
     if (Body != other.Body)
     {
         return(false);
     }
     if (Url != other.Url)
     {
         return(false);
     }
     if (!Params.Equals(other.Params))
     {
         return(false);
     }
     if (!AddParams.Equals(other.AddParams))
     {
         return(false);
     }
     if (!ExtendedParams.Equals(other.ExtendedParams))
     {
         return(false);
     }
     if (!deleteParams_.Equals(other.deleteParams_))
     {
         return(false);
     }
     if (!object.Equals(ReturnOverrides, other.ReturnOverrides))
     {
         return(false);
     }
     return(true);
 }
 public bool Equals(HttpResponse other)
 {
     if (ReferenceEquals(other, null))
     {
         return(false);
     }
     if (ReferenceEquals(other, this))
     {
         return(true);
     }
     if (StatusCode != other.StatusCode)
     {
         return(false);
     }
     if (!Headers.Equals(other.Headers))
     {
         return(false);
     }
     if (Body != other.Body)
     {
         return(false);
     }
     return(Equals(_unknownFields, other._unknownFields));
 }
예제 #7
0
        /// <summary>
        /// Returns true if ComAdobeGraniteAuthSsoImplSsoAuthenticationHandlerProperties instances are equal
        /// </summary>
        /// <param name="other">Instance of ComAdobeGraniteAuthSsoImplSsoAuthenticationHandlerProperties to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ComAdobeGraniteAuthSsoImplSsoAuthenticationHandlerProperties other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Path == other.Path ||
                     Path != null &&
                     Path.Equals(other.Path)
                     ) &&
                 (
                     ServiceRanking == other.ServiceRanking ||
                     ServiceRanking != null &&
                     ServiceRanking.Equals(other.ServiceRanking)
                 ) &&
                 (
                     JaasControlFlag == other.JaasControlFlag ||
                     JaasControlFlag != null &&
                     JaasControlFlag.Equals(other.JaasControlFlag)
                 ) &&
                 (
                     JaasRealmName == other.JaasRealmName ||
                     JaasRealmName != null &&
                     JaasRealmName.Equals(other.JaasRealmName)
                 ) &&
                 (
                     JaasRanking == other.JaasRanking ||
                     JaasRanking != null &&
                     JaasRanking.Equals(other.JaasRanking)
                 ) &&
                 (
                     Headers == other.Headers ||
                     Headers != null &&
                     Headers.Equals(other.Headers)
                 ) &&
                 (
                     Cookies == other.Cookies ||
                     Cookies != null &&
                     Cookies.Equals(other.Cookies)
                 ) &&
                 (
                     Parameters == other.Parameters ||
                     Parameters != null &&
                     Parameters.Equals(other.Parameters)
                 ) &&
                 (
                     Usermap == other.Usermap ||
                     Usermap != null &&
                     Usermap.Equals(other.Usermap)
                 ) &&
                 (
                     Format == other.Format ||
                     Format != null &&
                     Format.Equals(other.Format)
                 ) &&
                 (
                     TrustedCredentialsAttribute == other.TrustedCredentialsAttribute ||
                     TrustedCredentialsAttribute != null &&
                     TrustedCredentialsAttribute.Equals(other.TrustedCredentialsAttribute)
                 ));
        }
예제 #8
0
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }

            if (obj == null)
            {
                return(false);
            }

            if (GetType() != obj.GetType())
            {
                return(false);
            }

            var other = (MessageProperties)obj;

            if (AppId == null)
            {
                if (other.AppId != null)
                {
                    return(false);
                }
            }
            else if (!AppId.Equals(other.AppId))
            {
                return(false);
            }

            if (ClusterId == null)
            {
                if (other.ClusterId != null)
                {
                    return(false);
                }
            }
            else if (!ClusterId.Equals(other.ClusterId))
            {
                return(false);
            }

            if (ContentEncoding == null)
            {
                if (other.ContentEncoding != null)
                {
                    return(false);
                }
            }
            else if (!ContentEncoding.Equals(other.ContentEncoding))
            {
                return(false);
            }

            if (ContentLength != other.ContentLength)
            {
                return(false);
            }

            if (ContentType == null)
            {
                if (other.ContentType != null)
                {
                    return(false);
                }
            }
            else if (!ContentType.Equals(other.ContentType))
            {
                return(false);
            }

            if (CorrelationId == null)
            {
                if (other.CorrelationId != null)
                {
                    return(false);
                }
            }
            else if (!CorrelationId.Equals(other.CorrelationId))
            {
                return(false);
            }

            if (DeliveryMode != other.DeliveryMode)
            {
                return(false);
            }

            if (DeliveryTag != other.DeliveryTag)
            {
                return(false);
            }

            if (Expiration == null)
            {
                if (other.Expiration != null)
                {
                    return(false);
                }
            }
            else if (!Expiration.Equals(other.Expiration))
            {
                return(false);
            }

            if (!Headers.Equals(other.Headers))
            {
                return(false);
            }

            if (MessageCount == null)
            {
                if (other.MessageCount != null)
                {
                    return(false);
                }
            }
            else if (!MessageCount.Equals(other.MessageCount))
            {
                return(false);
            }

            if (MessageId == null)
            {
                if (other.MessageId != null)
                {
                    return(false);
                }
            }
            else if (!MessageId.Equals(other.MessageId))
            {
                return(false);
            }

            if (Priority == null)
            {
                if (other.Priority != null)
                {
                    return(false);
                }
            }
            else if (!Priority.Equals(other.Priority))
            {
                return(false);
            }

            if (ReceivedExchange == null)
            {
                if (other.ReceivedExchange != null)
                {
                    return(false);
                }
            }
            else if (!ReceivedExchange.Equals(other.ReceivedExchange))
            {
                return(false);
            }

            if (ReceivedRoutingKey == null)
            {
                if (other.ReceivedRoutingKey != null)
                {
                    return(false);
                }
            }
            else if (!ReceivedRoutingKey.Equals(other.ReceivedRoutingKey))
            {
                return(false);
            }

            if (Redelivered == null)
            {
                if (other.Redelivered != null)
                {
                    return(false);
                }
            }
            else if (!Redelivered.Equals(other.Redelivered))
            {
                return(false);
            }

            if (ReplyTo == null)
            {
                if (other.ReplyTo != null)
                {
                    return(false);
                }
            }
            else if (!ReplyTo.Equals(other.ReplyTo))
            {
                return(false);
            }

            if (Timestamp == null)
            {
                if (other.Timestamp != null)
                {
                    return(false);
                }
            }
            else if (!Timestamp.Equals(other.Timestamp))
            {
                return(false);
            }

            if (Type == null)
            {
                if (other.Type != null)
                {
                    return(false);
                }
            }
            else if (!Type.Equals(other.Type))
            {
                return(false);
            }

            if (UserId == null)
            {
                if (other.UserId != null)
                {
                    return(false);
                }
            }
            else if (!UserId.Equals(other.UserId))
            {
                return(false);
            }

            return(true);
        }