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) { MediaTypeHeaderValue other = obj as MediaTypeHeaderValue; if (other == null) { return(false); } return(string.Equals(_mediaType, other._mediaType, StringComparison.OrdinalIgnoreCase) && HeaderUtilities.AreEqualCollections(_parameters, other._parameters)); }
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); }