示例#1
0
        public override bool Equals(object obj)
        {
            RangeHeaderValue other = obj as RangeHeaderValue;

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

            return(string.Equals(_unit, other._unit, StringComparison.OrdinalIgnoreCase) &&
                   HeaderUtilities.AreEqualCollections(_ranges, other._ranges));
        }
        public override bool Equals(object obj)
        {
            ContentDispositionHeaderValue other = obj as ContentDispositionHeaderValue;

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

            return(string.Equals(_dispositionType, other._dispositionType, StringComparison.OrdinalIgnoreCase) &&
                   HeaderUtilities.AreEqualCollections(_parameters, other._parameters));
        }
        public override bool Equals(object obj)
        {
            TransferCodingHeaderValue other = obj as TransferCodingHeaderValue;

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

            return(string.Equals(_value, other._value, StringComparison.OrdinalIgnoreCase) &&
                   HeaderUtilities.AreEqualCollections(_parameters, other._parameters));
        }
示例#4
0
        public override bool Equals(object obj)
        {
            bool result = base.Equals(obj);

            if (result)
            {
                NameValueWithParametersHeaderValue other = obj as NameValueWithParametersHeaderValue;

                if (other == null)
                {
                    return(false);
                }
                return(HeaderUtilities.AreEqualCollections(_parameters, other._parameters));
            }

            return(false);
        }
        public override bool Equals(object obj)
        {
            CacheControlHeaderValue other = obj as CacheControlHeaderValue;

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

            if ((_noCache != other._noCache) || (_noStore != other._noStore) || (_maxAge != other._maxAge) ||
                (_sharedMaxAge != other._sharedMaxAge) || (_maxStale != other._maxStale) ||
                (_maxStaleLimit != other._maxStaleLimit) || (_minFresh != other._minFresh) ||
                (_noTransform != other._noTransform) || (_onlyIfCached != other._onlyIfCached) ||
                (_publicField != other._publicField) || (_privateField != other._privateField) ||
                (_mustRevalidate != other._mustRevalidate) || (_proxyRevalidate != other._proxyRevalidate))
            {
                return(false);
            }

            if (!HeaderUtilities.AreEqualCollections(_noCacheHeaders, other._noCacheHeaders,
                                                     StringComparer.OrdinalIgnoreCase))
            {
                return(false);
            }

            if (!HeaderUtilities.AreEqualCollections(_privateHeaders, other._privateHeaders,
                                                     StringComparer.OrdinalIgnoreCase))
            {
                return(false);
            }

            if (!HeaderUtilities.AreEqualCollections(_extensions, other._extensions))
            {
                return(false);
            }

            return(true);
        }