示例#1
0
 protected bool Equals(LiaraCookie cookie)
 {
     return(string.Equals(Name, cookie.Name) && string.Equals(Value, cookie.Value) &&
            string.Equals(Domain, cookie.Domain) && string.Equals(Path, cookie.Path) &&
            Expires.Equals(cookie.Expires) && SecureOnly.Equals(cookie.SecureOnly) &&
            HttpOnly.Equals(cookie.HttpOnly));
 }
示例#2
0
 /// <summary>
 /// Checks if the current WebCookie is equal to the provided one.
 /// </summary>
 /// <param name="other">The instance to compare to.</param>
 /// <returns>True if both are value-wise equal, otherwise false.</returns>
 public Boolean Equals(WebCookie other) =>
 Domain.Equals(other.Domain) &&
 Expires.Equals(other.Expires) &&
 IsHostOnly.Equals(other.IsHostOnly) &&
 IsHttpOnly.Equals(other.IsHttpOnly) &&
 IsSecure.Equals(other.IsSecure) &&
 Key.Equals(other.Key) &&
 Value.Equals(other.Value) &&
 Path.Equals(other.Path) &&
 MaxAge.Equals(other.MaxAge);
 public bool Equals(CacheRequestBase other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(string.Equals(ETag, other.ETag) &&
            MaxAge.Equals(other.MaxAge) &&
            Expires.Equals(other.Expires) &&
            LastModified.Equals(other.LastModified) &&
            CacheControl == other.CacheControl);
 }
示例#4
0
        public override bool Equals(object obj)
        {
            var other = obj as SetCookieHeaderValue;

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

            return(string.Equals(_name, other._name, StringComparison.OrdinalIgnoreCase) &&
                   string.Equals(_value, other._value, StringComparison.OrdinalIgnoreCase) &&
                   Expires.Equals(other.Expires) &&
                   MaxAge.Equals(other.MaxAge) &&
                   string.Equals(Domain, other.Domain, StringComparison.OrdinalIgnoreCase) &&
                   string.Equals(Path, other.Path, StringComparison.OrdinalIgnoreCase) &&
                   Secure == other.Secure &&
                   HttpOnly == other.HttpOnly);
        }
        public override bool Equals(object?obj)
        {
            var other = obj as SetCookieHeaderValue;

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

            return(StringSegment.Equals(_name, other._name, StringComparison.OrdinalIgnoreCase) &&
                   StringSegment.Equals(_value, other._value, StringComparison.OrdinalIgnoreCase) &&
                   Expires.Equals(other.Expires) &&
                   MaxAge.Equals(other.MaxAge) &&
                   StringSegment.Equals(Domain, other.Domain, StringComparison.OrdinalIgnoreCase) &&
                   StringSegment.Equals(Path, other.Path, StringComparison.OrdinalIgnoreCase) &&
                   Secure == other.Secure &&
                   SameSite == other.SameSite &&
                   HttpOnly == other.HttpOnly &&
                   HeaderUtilities.AreEqualCollections(Extensions, other.Extensions, StringSegmentComparer.OrdinalIgnoreCase));
        }
示例#6
0
 /// <summary>
 /// Returns true if the contents of this cookie exactly matches the other cookie provided
 /// </summary>
 /// <param name="other">the other cookie</param>
 /// <returns>the comparison result</returns>
 public bool Equals(HttpCookie other)
 {
     return(string.Equals(Name, other.Name) && string.Equals(Value, other.Value) &&
            string.Equals(Path, other.Path) && Secure == other.Secure && HttpOnly == other.HttpOnly &&
            string.Equals(Domain, other.Domain) && Expires.Equals(other.Expires) && SameSite == other.SameSite);
 }
示例#7
0
 public bool Equals(TokenOptions other)
 {
     return(NotBefore.Equals(other.NotBefore) && Expires.Equals(other.Expires) && Admin == other.Admin &&
            Debug == other.Debug);
 }
示例#8
0
 private bool Equals(TokenDetails other)
 {
     return(string.Equals(Token, other.Token) && Expires.Equals(other.Expires) && Issued.Equals(other.Issued) && Equals(Capability, other.Capability) && string.Equals(ClientId, other.ClientId));
 }