5 instantiations of EntityTagHeaderValue
Microsoft.AspNetCore.StaticAssets (1)
Development\StaticAssetDevelopmentRuntimeHandler.cs (1)
303ctx.Response.GetTypedHeaders().ETag = new EntityTagHeaderValue(GetETag(fileInfo));
Microsoft.AspNetCore.StaticFiles (1)
StaticFileContext.cs (1)
127_etag = new EntityTagHeaderValue('\"' + Convert.ToString(etagHash, 16) + '\"');
Microsoft.Net.Http.Headers (3)
EntityTagHeaderValue.cs (2)
75public static EntityTagHeaderValue Any { get; } = new EntityTagHeaderValue("*", isWeak: false); 254parsedValue = new EntityTagHeaderValue();
RangeConditionHeaderValue.cs (1)
51: this(new EntityTagHeaderValue(entityTag))
232 references to EntityTagHeaderValue
Microsoft.AspNetCore.HeaderParsing (7)
CommonHeaders.cs (3)
65public static HeaderSetup<IReadOnlyList<EntityTagHeaderValue>> IfMatch => new(HeaderNames.IfMatch, EntityTagHeaderValueListParser.Instance); 70public static HeaderSetup<IReadOnlyList<EntityTagHeaderValue>> IfModifiedSince => new(HeaderNames.IfModifiedSince, EntityTagHeaderValueListParser.Instance); 75public static HeaderSetup<IReadOnlyList<EntityTagHeaderValue>> IfNoneMatch => new(HeaderNames.IfNoneMatch, EntityTagHeaderValueListParser.Instance);
Parsers\EntityTagHeaderValueListParser.cs (4)
11internal sealed class EntityTagHeaderValueListParser : HeaderParser<IReadOnlyList<EntityTagHeaderValue>> 15public override bool TryParse(StringValues values, [NotNullWhen(true)] out IReadOnlyList<EntityTagHeaderValue>? result, [NotNullWhen(false)] out string? error) 17if (!EntityTagHeaderValue.TryParseList(values, out var parsedValues)) 25result = (IReadOnlyList<EntityTagHeaderValue>)parsedValues;
Microsoft.AspNetCore.Http.Extensions (14)
HeaderDictionaryTypeExtensions.cs (8)
147private static EntityTagHeaderValue? ParseCacheEntityTagHeaderValue(string value) => EntityTagHeaderValue.TryParse(value, out var result) ? result : null; 162private static IList<EntityTagHeaderValue> ParseEntityTagHeaderValue(IList<string> value) => 163EntityTagHeaderValue.TryParseList(value, out var result) ? result : Array.Empty<EntityTagHeaderValue>(); 204else if (typeof(T) == typeof(EntityTagHeaderValue)) 249else if (typeof(T) == typeof(EntityTagHeaderValue))
RequestHeaders.cs (4)
229public IList<EntityTagHeaderValue> IfMatch 233return Headers.IfMatch.GetList<EntityTagHeaderValue>(); 259public IList<EntityTagHeaderValue> IfNoneMatch 263return Headers.IfNoneMatch.GetList<EntityTagHeaderValue>();
ResponseHeaders.cs (2)
124public EntityTagHeaderValue? ETag 128return Headers.Get<EntityTagHeaderValue>(HeaderNames.ETag);
Microsoft.AspNetCore.Http.Results (80)
_generated\0\LoggerMessage.g.cs (9)
241private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Net.Http.Headers.EntityTagHeaderValue, global::System.Exception?> __IfMatchPreconditionFailedCallback = 242global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.Net.Http.Headers.EntityTagHeaderValue>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(34, "IfMatchPreconditionFailed"), "Current request's If-Match header check failed as the file's current etag '{CurrentETag}' does not match with any of the supplied etags.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 249public static partial void IfMatchPreconditionFailed(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Net.Http.Headers.EntityTagHeaderValue currentETag) 289private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Net.Http.Headers.EntityTagHeaderValue, global::Microsoft.Net.Http.Headers.EntityTagHeaderValue, global::System.Exception?> __IfRangeETagPreconditionFailedCallback = 290global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.Net.Http.Headers.EntityTagHeaderValue, global::Microsoft.Net.Http.Headers.EntityTagHeaderValue>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(37, "IfRangeETagPreconditionFailed"), "Could not serve range as the file's current etag '{CurrentETag}' does not match the If-Range etag '{IfRangeETag}'.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 297public static partial void IfRangeETagPreconditionFailed(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Net.Http.Headers.EntityTagHeaderValue currentETag, global::Microsoft.Net.Http.Headers.EntityTagHeaderValue IfRangeETag)
FileContentHttpResult.cs (3)
53/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param> 60EntityTagHeaderValue? entityTag = null) 89public EntityTagHeaderValue? EntityTag { get; internal init; }
FileStreamHttpResult.cs (3)
53/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param> 60EntityTagHeaderValue? entityTag = null) 95public EntityTagHeaderValue? EntityTag { get; internal init; }
HttpResultsHelper.cs (1)
105EntityTagHeaderValue? entityTag)
PhysicalFileHttpResult.cs (3)
51/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param> 58EntityTagHeaderValue? entityTag = null) 86public EntityTagHeaderValue? EntityTag { get; internal init; }
PushStreamHttpResult.cs (3)
53/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param> 60EntityTagHeaderValue? entityTag = null) 88public EntityTagHeaderValue? EntityTag { get; internal init; }
Results.cs (20)
285/// This API is an alias for <see cref="Bytes(byte[], string, string?, bool, DateTimeOffset?, EntityTagHeaderValue?)"/>.</para> 292/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param> 300EntityTagHeaderValue? entityTag = null) 310/// This API is an alias for <see cref="File(byte[], string, string?, bool, DateTimeOffset?, EntityTagHeaderValue?)"/>.</para> 317/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param> 325EntityTagHeaderValue? entityTag = null) 340/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param> 348EntityTagHeaderValue? entityTag = null) 358/// This API is an alias for <see cref="Stream(Stream, string, string?, DateTimeOffset?, EntityTagHeaderValue?, bool)"/>. 366/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> to be configure the <c>ETag</c> response header 378EntityTagHeaderValue? entityTag = null, 389/// This API is an alias for <see cref="File(Stream, string, string?, DateTimeOffset?, EntityTagHeaderValue?, bool)"/>. 397/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> to be configure the <c>ETag</c> response header 409EntityTagHeaderValue? entityTag = null, 425/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> to be configure the <c>ETag</c> response header 437EntityTagHeaderValue? entityTag = null, 449/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> to be configure the <c>ETag</c> response header 457EntityTagHeaderValue? entityTag = null) 471/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param> 479EntityTagHeaderValue? entityTag = null,
src\aspnetcore\src\Shared\ResultsHelpers\FileResultHelper.cs (11)
96EntityTagHeaderValue? etag, 164EntityTagHeaderValue? etag, 197EntityTagHeaderValue? etag, 263IList<EntityTagHeaderValue> etagHeader, 264EntityTagHeaderValue etag, 271foreach (var entityTag in etagHeader) 273if (entityTag.Equals(EntityTagHeaderValue.Any) || entityTag.Compare(etag, useStrongComparison)) 358private static void SetLastModifiedAndEtagHeaders(HttpResponse response, DateTimeOffset? lastModified, EntityTagHeaderValue? etag) 404public static partial void IfMatchPreconditionFailed(ILogger logger, EntityTagHeaderValue currentETag); 427EntityTagHeaderValue currentETag, 428EntityTagHeaderValue IfRangeETag);
src\aspnetcore\src\Shared\ResultsHelpers\FileResultInfo.cs (1)
17public EntityTagHeaderValue? EntityTag { get; init; }
src\aspnetcore\src\Shared\ResultsHelpers\FileResultLogging.cs (1)
15void IfMatchPreconditionFailed(EntityTagHeaderValue etag);
TypedResults.cs (22)
249/// This API is an alias for <see cref="Bytes(byte[], string, string?, bool, DateTimeOffset?, EntityTagHeaderValue?)"/>.</para> 256/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param> 264EntityTagHeaderValue? entityTag = null) 284/// This API is an alias for <see cref="File(byte[], string, string?, bool, DateTimeOffset?, EntityTagHeaderValue?)"/>.</para> 291/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param> 299EntityTagHeaderValue? entityTag = null) 324/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param> 332EntityTagHeaderValue? entityTag = null) 348/// This API is an alias for <see cref="Stream(Stream, string, string?, DateTimeOffset?, EntityTagHeaderValue?, bool)"/>. 359/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> to be configure the <c>ETag</c> response header 368EntityTagHeaderValue? entityTag = null, 389/// This API is an alias for <see cref="File(Stream, string, string?, DateTimeOffset?, EntityTagHeaderValue?, bool)"/>. 400/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> to be configure the <c>ETag</c> response header 409EntityTagHeaderValue? entityTag = null, 438/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> to be configure the <c>ETag</c> response header 447EntityTagHeaderValue? entityTag = null, 469/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> to be configure the <c>ETag</c> response header 477EntityTagHeaderValue? entityTag = null) 500/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param> 508EntityTagHeaderValue? entityTag = null, 533/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param> 541EntityTagHeaderValue? entityTag = null,
VirtualFileHttpResult.cs (3)
56/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param> 63EntityTagHeaderValue? entityTag = null) 83public EntityTagHeaderValue? EntityTag { get; internal init; }
Microsoft.AspNetCore.Mvc.Core (57)
_generated\0\LoggerMessage.g.cs (9)
27private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Net.Http.Headers.EntityTagHeaderValue, global::System.Exception?> __IfMatchPreconditionFailedCallback = 28global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.Net.Http.Headers.EntityTagHeaderValue>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(34, "IfMatchPreconditionFailed"), "Current request's If-Match header check failed as the file's current etag '{CurrentETag}' does not match with any of the supplied etags.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 35public static partial void IfMatchPreconditionFailed(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Net.Http.Headers.EntityTagHeaderValue currentETag) 75private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Net.Http.Headers.EntityTagHeaderValue, global::Microsoft.Net.Http.Headers.EntityTagHeaderValue, global::System.Exception?> __IfRangeETagPreconditionFailedCallback = 76global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.Net.Http.Headers.EntityTagHeaderValue, global::Microsoft.Net.Http.Headers.EntityTagHeaderValue>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(37, "IfRangeETagPreconditionFailed"), "Could not serve range as the file's current etag '{CurrentETag}' does not match the If-Range etag '{IfRangeETag}'.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 83public static partial void IfRangeETagPreconditionFailed(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Net.Http.Headers.EntityTagHeaderValue currentETag, global::Microsoft.Net.Http.Headers.EntityTagHeaderValue IfRangeETag)
ControllerBase.cs (32)
1133/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param> 1136public virtual FileContentResult File(byte[] fileContents, string contentType, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag) 1154/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param> 1158public virtual FileContentResult File(byte[] fileContents, string contentType, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag, bool enableRangeProcessing) 1178/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param> 1181public virtual FileContentResult File(byte[] fileContents, string contentType, string? fileDownloadName, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag) 1201/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param> 1205public virtual FileContentResult File(byte[] fileContents, string contentType, string? fileDownloadName, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag, bool enableRangeProcessing) 1299/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param> 1305public virtual FileStreamResult File(Stream fileStream, string contentType, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag) 1323/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param> 1330public virtual FileStreamResult File(Stream fileStream, string contentType, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag, bool enableRangeProcessing) 1350/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param> 1356public virtual FileStreamResult File(Stream fileStream, string contentType, string? fileDownloadName, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag) 1376/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param> 1383public virtual FileStreamResult File(Stream fileStream, string contentType, string? fileDownloadName, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag, bool enableRangeProcessing) 1465/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param> 1468public virtual VirtualFileResult File(string virtualPath, string contentType, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag) 1486/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param> 1490public virtual VirtualFileResult File(string virtualPath, string contentType, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag, bool enableRangeProcessing) 1510/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param> 1513public virtual VirtualFileResult File(string virtualPath, string contentType, string? fileDownloadName, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag) 1533/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param> 1537public virtual VirtualFileResult File(string virtualPath, string contentType, string? fileDownloadName, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag, bool enableRangeProcessing) 1626/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param> 1629public virtual PhysicalFileResult PhysicalFile(string physicalPath, string contentType, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag) 1647/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param> 1651public virtual PhysicalFileResult PhysicalFile(string physicalPath, string contentType, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag, bool enableRangeProcessing) 1671/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param> 1674public virtual PhysicalFileResult PhysicalFile(string physicalPath, string contentType, string? fileDownloadName, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag) 1694/// <param name="entityTag">The <see cref="EntityTagHeaderValue"/> associated with the file.</param> 1698public virtual PhysicalFileResult PhysicalFile(string physicalPath, string contentType, string? fileDownloadName, DateTimeOffset? lastModified, EntityTagHeaderValue entityTag, bool enableRangeProcessing)
FileResult.cs (1)
52public EntityTagHeaderValue? EntityTag { get; set; }
Infrastructure\FileResultExecutorBase.cs (2)
51/// <param name="etag">The <see cref="EntityTagHeaderValue"/>.</param> 59EntityTagHeaderValue? etag = null)
src\aspnetcore\src\Shared\ResultsHelpers\FileResultHelper.cs (11)
96EntityTagHeaderValue? etag, 164EntityTagHeaderValue? etag, 197EntityTagHeaderValue? etag, 263IList<EntityTagHeaderValue> etagHeader, 264EntityTagHeaderValue etag, 271foreach (var entityTag in etagHeader) 273if (entityTag.Equals(EntityTagHeaderValue.Any) || entityTag.Compare(etag, useStrongComparison)) 358private static void SetLastModifiedAndEtagHeaders(HttpResponse response, DateTimeOffset? lastModified, EntityTagHeaderValue? etag) 404public static partial void IfMatchPreconditionFailed(ILogger logger, EntityTagHeaderValue currentETag); 427EntityTagHeaderValue currentETag, 428EntityTagHeaderValue IfRangeETag);
src\aspnetcore\src\Shared\ResultsHelpers\FileResultInfo.cs (1)
17public EntityTagHeaderValue? EntityTag { get; init; }
src\aspnetcore\src\Shared\ResultsHelpers\FileResultLogging.cs (1)
15void IfMatchPreconditionFailed(EntityTagHeaderValue etag);
Microsoft.AspNetCore.OutputCaching (9)
_generated\0\LoggerMessage.g.cs (3)
25private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Net.Http.Headers.EntityTagHeaderValue, global::System.Exception?> __NotModifiedIfNoneMatchMatchedCallback = 26global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.Net.Http.Headers.EntityTagHeaderValue>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(2, "NotModifiedIfNoneMatchMatched"), "The ETag {ETag} in the 'IfNoneMatch' header matched the ETag of a cached entry.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 33internal static partial void NotModifiedIfNoneMatchMatched(this global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Net.Http.Headers.EntityTagHeaderValue etag)
LoggerExtensions.cs (1)
19internal static partial void NotModifiedIfNoneMatchMatched(this ILogger logger, EntityTagHeaderValue etag);
OutputCacheMiddleware.cs (5)
529if (ifNoneMatchHeader.Count == 1 && StringSegment.Equals(ifNoneMatchHeader[0], EntityTagHeaderValue.Any.Tag, StringComparison.OrdinalIgnoreCase)) 537&& EntityTagHeaderValue.TryParse(raw.ToString(), out var eTag) 538&& EntityTagHeaderValue.TryParseList(ifNoneMatchHeader, out var ifNoneMatchETags)) 542var requestETag = ifNoneMatchETags[i];
Microsoft.AspNetCore.ResponseCaching (9)
_generated\0\LoggerMessage.g.cs (3)
297private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Net.Http.Headers.EntityTagHeaderValue, global::System.Exception?> __NotModifiedIfNoneMatchMatchedCallback = 298global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.Net.Http.Headers.EntityTagHeaderValue>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(19, "NotModifiedIfNoneMatchMatched"), "The ETag {ETag} in the 'IfNoneMatch' header matched the ETag of a cached entry.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 305internal static partial void NotModifiedIfNoneMatchMatched(this global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Net.Http.Headers.EntityTagHeaderValue etag)
LoggerExtensions.cs (1)
86internal static partial void NotModifiedIfNoneMatchMatched(this ILogger logger, EntityTagHeaderValue etag);
ResponseCachingMiddleware.cs (5)
472if (ifNoneMatchHeader.Count == 1 && StringSegment.Equals(ifNoneMatchHeader[0], EntityTagHeaderValue.Any.Tag, StringComparison.OrdinalIgnoreCase)) 478EntityTagHeaderValue? eTag; 480&& EntityTagHeaderValue.TryParse(cachedResponseHeaders.ETag.ToString(), out eTag) 481&& EntityTagHeaderValue.TryParseList(ifNoneMatchHeader, out var ifNoneMatchEtags)) 485var requestETag = ifNoneMatchEtags[i];
Microsoft.AspNetCore.StaticAssets (13)
Development\StaticAssetDescriptorExtensions.cs (5)
38internal static EntityTagHeaderValue GetWeakETag(this StaticAssetDescriptor descriptor) 44var eTag = EntityTagHeaderValue.Parse(header.Value); 74var eTag = EntityTagHeaderValue.Parse(header.Value);
StaticAssetsInvoker.cs (8)
25private readonly EntityTagHeaderValue _etag; 54_etag = EntityTagHeaderValue.Parse(etag); 256private readonly EntityTagHeaderValue _etag; 264EntityTagHeaderValue entityTag, 308foreach (var etag in ifMatch) 310if (etag.Equals(EntityTagHeaderValue.Any) || etag.Compare(_etag, useStrongComparison: false)) 324foreach (var etag in ifNoneMatch) 326if (etag.Equals(EntityTagHeaderValue.Any) || etag.Compare(_etag, useStrongComparison: false))
Microsoft.AspNetCore.StaticFiles (5)
StaticFileContext.cs (5)
28private EntityTagHeaderValue? _etag; 152foreach (var etag in ifMatch) 154if (etag.Equals(EntityTagHeaderValue.Any) || etag.Compare(_etag, useStrongComparison: true)) 167foreach (var etag in ifNoneMatch) 169if (etag.Equals(EntityTagHeaderValue.Any) || etag.Compare(_etag, useStrongComparison: true))
Microsoft.Net.Http.Headers (38)
EntityTagHeaderValue.cs (32)
17private static readonly HttpHeaderParser<EntityTagHeaderValue> SingleValueParser 18= new GenericHeaderParser<EntityTagHeaderValue>(false, GetEntityTagLength); 23private static readonly HttpHeaderParser<EntityTagHeaderValue> MultipleValueParser 24= new GenericHeaderParser<EntityTagHeaderValue>(true, GetEntityTagLength); 35/// Initializes a new instance of the <see cref="EntityTagHeaderValue"/>. 37/// <param name="tag">A <see cref="StringSegment"/> that contains an <see cref="EntityTagHeaderValue"/>.</param> 44/// Initializes a new instance of the <see cref="EntityTagHeaderValue"/>. 46/// <param name="tag">A <see cref="StringSegment"/> that contains an <see cref="EntityTagHeaderValue"/>.</param> 75public static EntityTagHeaderValue Any { get; } = new EntityTagHeaderValue("*", isWeak: false); 98/// Check against another <see cref="EntityTagHeaderValue"/> for equality. 104/// <c>false</c> if the other value is null, is not an <see cref="EntityTagHeaderValue"/>, or if there is a mismatch of strength or tag between the two values. 109return obj is EntityTagHeaderValue other && _isWeak == other._isWeak && StringSegment.Equals(_tag, other._tag, StringComparison.Ordinal); 120/// Compares against another <see cref="EntityTagHeaderValue"/> to see if they match under the RFC specifications (<see href="https://tools.ietf.org/html/rfc7232#section-2.3.2"/>). 122/// <param name="other">The other <see cref="EntityTagHeaderValue"/> to compare against.</param> 125/// <c>true</c> if the <see cref="EntityTagHeaderValue"/> match for the given comparison type, 128public bool Compare(EntityTagHeaderValue? other, bool useStrongComparison) 146/// Parses <paramref name="input"/> as a <see cref="EntityTagHeaderValue"/> value. 150public static EntityTagHeaderValue Parse(StringSegment input) 157/// Attempts to parse the specified <paramref name="input"/> as a <see cref="EntityTagHeaderValue"/>. 161/// <returns><see langword="true"/> if input is a valid <see cref="EntityTagHeaderValue"/>, otherwise <see langword="false"/>.</returns> 162public static bool TryParse(StringSegment input, [NotNullWhen(true)] out EntityTagHeaderValue? parsedValue) 169/// Parses a sequence of inputs as a sequence of <see cref="EntityTagHeaderValue"/> values. 173public static IList<EntityTagHeaderValue> ParseList(IList<string>? inputs) 179/// Parses a sequence of inputs as a sequence of <see cref="EntityTagHeaderValue"/> values using string parsing rules. 183public static IList<EntityTagHeaderValue> ParseStrictList(IList<string>? inputs) 189/// Attempts to parse the sequence of values as a sequence of <see cref="EntityTagHeaderValue"/>. 193/// <returns><see langword="true"/> if all inputs are valid <see cref="EntityTagHeaderValue"/>, otherwise <see langword="false"/>.</returns> 194public static bool TryParseList(IList<string>? inputs, [NotNullWhen(true)] out IList<EntityTagHeaderValue>? parsedValues) 200/// Attempts to parse the sequence of values as a sequence of <see cref="EntityTagHeaderValue"/> using string parsing rules. 204/// <returns><see langword="true"/> if all inputs are valid <see cref="EntityTagHeaderValue"/>, otherwise <see langword="false"/>.</returns> 205public static bool TryParseStrictList(IList<string>? inputs, [NotNullWhen(true)] out IList<EntityTagHeaderValue>? parsedValues) 210internal static int GetEntityTagLength(StringSegment input, int startIndex, out EntityTagHeaderValue? parsedValue)
RangeConditionHeaderValue.cs (6)
19private EntityTagHeaderValue? _entityTag; 39public RangeConditionHeaderValue(EntityTagHeaderValue entityTag) 64/// Gets the <see cref="EntityTagHeaderValue"/> from header. 66public EntityTagHeaderValue? EntityTag 149EntityTagHeaderValue? entityTag = null; 159var entityTagLength = EntityTagHeaderValue.GetEntityTagLength(input, current, out entityTag);