5 instantiations of EntityTagHeaderValue
Microsoft.AspNetCore.StaticAssets (1)
Development\StaticAssetDevelopmentRuntimeHandler.cs (1)
303
ctx.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)
75
public static EntityTagHeaderValue Any { get; } = new
EntityTagHeaderValue
("*", isWeak: false);
254
parsedValue = new
EntityTagHeaderValue
();
RangeConditionHeaderValue.cs (1)
51
: this(new
EntityTagHeaderValue
(entityTag))
232 references to EntityTagHeaderValue
Microsoft.AspNetCore.HeaderParsing (7)
CommonHeaders.cs (3)
65
public static HeaderSetup<IReadOnlyList<
EntityTagHeaderValue
>> IfMatch => new(HeaderNames.IfMatch, EntityTagHeaderValueListParser.Instance);
70
public static HeaderSetup<IReadOnlyList<
EntityTagHeaderValue
>> IfModifiedSince => new(HeaderNames.IfModifiedSince, EntityTagHeaderValueListParser.Instance);
75
public static HeaderSetup<IReadOnlyList<
EntityTagHeaderValue
>> IfNoneMatch => new(HeaderNames.IfNoneMatch, EntityTagHeaderValueListParser.Instance);
Parsers\EntityTagHeaderValueListParser.cs (4)
11
internal sealed class EntityTagHeaderValueListParser : HeaderParser<IReadOnlyList<
EntityTagHeaderValue
>>
15
public override bool TryParse(StringValues values, [NotNullWhen(true)] out IReadOnlyList<
EntityTagHeaderValue
>? result, [NotNullWhen(false)] out string? error)
17
if (!
EntityTagHeaderValue
.TryParseList(values, out var parsedValues))
25
result = (IReadOnlyList<
EntityTagHeaderValue
>)parsedValues;
Microsoft.AspNetCore.Http.Extensions (14)
HeaderDictionaryTypeExtensions.cs (8)
147
private static
EntityTagHeaderValue
? ParseCacheEntityTagHeaderValue(string value) =>
EntityTagHeaderValue
.TryParse(value, out
var
result) ? result : null;
162
private static IList<
EntityTagHeaderValue
> ParseEntityTagHeaderValue(IList<string> value) =>
163
EntityTagHeaderValue
.TryParseList(value, out var result) ? result : Array.Empty<
EntityTagHeaderValue
>();
204
else if (typeof(T) == typeof(
EntityTagHeaderValue
))
249
else if (typeof(T) == typeof(
EntityTagHeaderValue
))
RequestHeaders.cs (4)
229
public IList<
EntityTagHeaderValue
> IfMatch
233
return Headers.IfMatch.GetList<
EntityTagHeaderValue
>();
259
public IList<
EntityTagHeaderValue
> IfNoneMatch
263
return Headers.IfNoneMatch.GetList<
EntityTagHeaderValue
>();
ResponseHeaders.cs (2)
124
public
EntityTagHeaderValue
? ETag
128
return Headers.Get<
EntityTagHeaderValue
>(HeaderNames.ETag);
Microsoft.AspNetCore.Http.Results (80)
_generated\0\LoggerMessage.g.cs (9)
241
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Net.Http.Headers.
EntityTagHeaderValue
, global::System.Exception?> __IfMatchPreconditionFailedCallback =
242
global::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 });
249
public static partial void IfMatchPreconditionFailed(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Net.Http.Headers.
EntityTagHeaderValue
currentETag)
289
private 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 =
290
global::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 });
297
public 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>
60
EntityTagHeaderValue
? entityTag = null)
89
public
EntityTagHeaderValue
? EntityTag { get; internal init; }
FileStreamHttpResult.cs (3)
53
/// <param name="entityTag">The <see cref="
EntityTagHeaderValue
"/> associated with the file.</param>
60
EntityTagHeaderValue
? entityTag = null)
95
public
EntityTagHeaderValue
? EntityTag { get; internal init; }
HttpResultsHelper.cs (1)
105
EntityTagHeaderValue
? entityTag)
PhysicalFileHttpResult.cs (3)
51
/// <param name="entityTag">The <see cref="
EntityTagHeaderValue
"/> associated with the file.</param>
58
EntityTagHeaderValue
? entityTag = null)
86
public
EntityTagHeaderValue
? EntityTag { get; internal init; }
PushStreamHttpResult.cs (3)
53
/// <param name="entityTag">The <see cref="
EntityTagHeaderValue
"/> associated with the file.</param>
60
EntityTagHeaderValue
? entityTag = null)
88
public
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>
300
EntityTagHeaderValue
? 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>
325
EntityTagHeaderValue
? entityTag = null)
340
/// <param name="entityTag">The <see cref="
EntityTagHeaderValue
"/> associated with the file.</param>
348
EntityTagHeaderValue
? 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
378
EntityTagHeaderValue
? 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
409
EntityTagHeaderValue
? entityTag = null,
425
/// <param name="entityTag">The <see cref="
EntityTagHeaderValue
"/> to be configure the <c>ETag</c> response header
437
EntityTagHeaderValue
? entityTag = null,
449
/// <param name="entityTag">The <see cref="
EntityTagHeaderValue
"/> to be configure the <c>ETag</c> response header
457
EntityTagHeaderValue
? entityTag = null)
471
/// <param name="entityTag">The <see cref="
EntityTagHeaderValue
"/> associated with the file.</param>
479
EntityTagHeaderValue
? entityTag = null,
src\aspnetcore\src\Shared\ResultsHelpers\FileResultHelper.cs (11)
96
EntityTagHeaderValue
? etag,
164
EntityTagHeaderValue
? etag,
197
EntityTagHeaderValue
? etag,
263
IList<
EntityTagHeaderValue
> etagHeader,
264
EntityTagHeaderValue
etag,
271
foreach (
var
entityTag in etagHeader)
273
if (entityTag.Equals(
EntityTagHeaderValue
.Any) || entityTag.Compare(etag, useStrongComparison))
358
private static void SetLastModifiedAndEtagHeaders(HttpResponse response, DateTimeOffset? lastModified,
EntityTagHeaderValue
? etag)
404
public static partial void IfMatchPreconditionFailed(ILogger logger,
EntityTagHeaderValue
currentETag);
427
EntityTagHeaderValue
currentETag,
428
EntityTagHeaderValue
IfRangeETag);
src\aspnetcore\src\Shared\ResultsHelpers\FileResultInfo.cs (1)
17
public
EntityTagHeaderValue
? EntityTag { get; init; }
src\aspnetcore\src\Shared\ResultsHelpers\FileResultLogging.cs (1)
15
void 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>
264
EntityTagHeaderValue
? 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>
299
EntityTagHeaderValue
? entityTag = null)
324
/// <param name="entityTag">The <see cref="
EntityTagHeaderValue
"/> associated with the file.</param>
332
EntityTagHeaderValue
? 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
368
EntityTagHeaderValue
? 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
409
EntityTagHeaderValue
? entityTag = null,
438
/// <param name="entityTag">The <see cref="
EntityTagHeaderValue
"/> to be configure the <c>ETag</c> response header
447
EntityTagHeaderValue
? entityTag = null,
469
/// <param name="entityTag">The <see cref="
EntityTagHeaderValue
"/> to be configure the <c>ETag</c> response header
477
EntityTagHeaderValue
? entityTag = null)
500
/// <param name="entityTag">The <see cref="
EntityTagHeaderValue
"/> associated with the file.</param>
508
EntityTagHeaderValue
? entityTag = null,
533
/// <param name="entityTag">The <see cref="
EntityTagHeaderValue
"/> associated with the file.</param>
541
EntityTagHeaderValue
? entityTag = null,
VirtualFileHttpResult.cs (3)
56
/// <param name="entityTag">The <see cref="
EntityTagHeaderValue
"/> associated with the file.</param>
63
EntityTagHeaderValue
? entityTag = null)
83
public
EntityTagHeaderValue
? EntityTag { get; internal init; }
Microsoft.AspNetCore.Mvc.Core (57)
_generated\0\LoggerMessage.g.cs (9)
27
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Net.Http.Headers.
EntityTagHeaderValue
, global::System.Exception?> __IfMatchPreconditionFailedCallback =
28
global::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 });
35
public static partial void IfMatchPreconditionFailed(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Net.Http.Headers.
EntityTagHeaderValue
currentETag)
75
private 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 =
76
global::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 });
83
public 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>
1136
public virtual FileContentResult File(byte[] fileContents, string contentType, DateTimeOffset? lastModified,
EntityTagHeaderValue
entityTag)
1154
/// <param name="entityTag">The <see cref="
EntityTagHeaderValue
"/> associated with the file.</param>
1158
public 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>
1181
public 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>
1205
public 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>
1305
public virtual FileStreamResult File(Stream fileStream, string contentType, DateTimeOffset? lastModified,
EntityTagHeaderValue
entityTag)
1323
/// <param name="entityTag">The <see cref="
EntityTagHeaderValue
"/> associated with the file.</param>
1330
public 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>
1356
public 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>
1383
public 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>
1468
public virtual VirtualFileResult File(string virtualPath, string contentType, DateTimeOffset? lastModified,
EntityTagHeaderValue
entityTag)
1486
/// <param name="entityTag">The <see cref="
EntityTagHeaderValue
"/> associated with the file.</param>
1490
public 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>
1513
public 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>
1537
public 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>
1629
public virtual PhysicalFileResult PhysicalFile(string physicalPath, string contentType, DateTimeOffset? lastModified,
EntityTagHeaderValue
entityTag)
1647
/// <param name="entityTag">The <see cref="
EntityTagHeaderValue
"/> associated with the file.</param>
1651
public 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>
1674
public 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>
1698
public virtual PhysicalFileResult PhysicalFile(string physicalPath, string contentType, string? fileDownloadName, DateTimeOffset? lastModified,
EntityTagHeaderValue
entityTag, bool enableRangeProcessing)
FileResult.cs (1)
52
public
EntityTagHeaderValue
? EntityTag { get; set; }
Infrastructure\FileResultExecutorBase.cs (2)
51
/// <param name="etag">The <see cref="
EntityTagHeaderValue
"/>.</param>
59
EntityTagHeaderValue
? etag = null)
src\aspnetcore\src\Shared\ResultsHelpers\FileResultHelper.cs (11)
96
EntityTagHeaderValue
? etag,
164
EntityTagHeaderValue
? etag,
197
EntityTagHeaderValue
? etag,
263
IList<
EntityTagHeaderValue
> etagHeader,
264
EntityTagHeaderValue
etag,
271
foreach (
var
entityTag in etagHeader)
273
if (entityTag.Equals(
EntityTagHeaderValue
.Any) || entityTag.Compare(etag, useStrongComparison))
358
private static void SetLastModifiedAndEtagHeaders(HttpResponse response, DateTimeOffset? lastModified,
EntityTagHeaderValue
? etag)
404
public static partial void IfMatchPreconditionFailed(ILogger logger,
EntityTagHeaderValue
currentETag);
427
EntityTagHeaderValue
currentETag,
428
EntityTagHeaderValue
IfRangeETag);
src\aspnetcore\src\Shared\ResultsHelpers\FileResultInfo.cs (1)
17
public
EntityTagHeaderValue
? EntityTag { get; init; }
src\aspnetcore\src\Shared\ResultsHelpers\FileResultLogging.cs (1)
15
void IfMatchPreconditionFailed(
EntityTagHeaderValue
etag);
Microsoft.AspNetCore.OutputCaching (9)
_generated\0\LoggerMessage.g.cs (3)
25
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Net.Http.Headers.
EntityTagHeaderValue
, global::System.Exception?> __NotModifiedIfNoneMatchMatchedCallback =
26
global::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 });
33
internal static partial void NotModifiedIfNoneMatchMatched(this global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Net.Http.Headers.
EntityTagHeaderValue
etag)
LoggerExtensions.cs (1)
19
internal static partial void NotModifiedIfNoneMatchMatched(this ILogger logger,
EntityTagHeaderValue
etag);
OutputCacheMiddleware.cs (5)
529
if (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))
542
var
requestETag = ifNoneMatchETags[i];
Microsoft.AspNetCore.ResponseCaching (9)
_generated\0\LoggerMessage.g.cs (3)
297
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Net.Http.Headers.
EntityTagHeaderValue
, global::System.Exception?> __NotModifiedIfNoneMatchMatchedCallback =
298
global::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 });
305
internal static partial void NotModifiedIfNoneMatchMatched(this global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Net.Http.Headers.
EntityTagHeaderValue
etag)
LoggerExtensions.cs (1)
86
internal static partial void NotModifiedIfNoneMatchMatched(this ILogger logger,
EntityTagHeaderValue
etag);
ResponseCachingMiddleware.cs (5)
472
if (ifNoneMatchHeader.Count == 1 && StringSegment.Equals(ifNoneMatchHeader[0],
EntityTagHeaderValue
.Any.Tag, StringComparison.OrdinalIgnoreCase))
478
EntityTagHeaderValue
? eTag;
480
&&
EntityTagHeaderValue
.TryParse(cachedResponseHeaders.ETag.ToString(), out eTag)
481
&&
EntityTagHeaderValue
.TryParseList(ifNoneMatchHeader, out var ifNoneMatchEtags))
485
var
requestETag = ifNoneMatchEtags[i];
Microsoft.AspNetCore.StaticAssets (13)
Development\StaticAssetDescriptorExtensions.cs (5)
38
internal static
EntityTagHeaderValue
GetWeakETag(this StaticAssetDescriptor descriptor)
44
var
eTag =
EntityTagHeaderValue
.Parse(header.Value);
74
var
eTag =
EntityTagHeaderValue
.Parse(header.Value);
StaticAssetsInvoker.cs (8)
25
private readonly
EntityTagHeaderValue
_etag;
54
_etag =
EntityTagHeaderValue
.Parse(etag);
256
private readonly
EntityTagHeaderValue
_etag;
264
EntityTagHeaderValue
entityTag,
308
foreach (
var
etag in ifMatch)
310
if (etag.Equals(
EntityTagHeaderValue
.Any) || etag.Compare(_etag, useStrongComparison: false))
324
foreach (
var
etag in ifNoneMatch)
326
if (etag.Equals(
EntityTagHeaderValue
.Any) || etag.Compare(_etag, useStrongComparison: false))
Microsoft.AspNetCore.StaticFiles (5)
StaticFileContext.cs (5)
28
private
EntityTagHeaderValue
? _etag;
152
foreach (
var
etag in ifMatch)
154
if (etag.Equals(
EntityTagHeaderValue
.Any) || etag.Compare(_etag, useStrongComparison: true))
167
foreach (
var
etag in ifNoneMatch)
169
if (etag.Equals(
EntityTagHeaderValue
.Any) || etag.Compare(_etag, useStrongComparison: true))
Microsoft.Net.Http.Headers (38)
EntityTagHeaderValue.cs (32)
17
private static readonly HttpHeaderParser<
EntityTagHeaderValue
> SingleValueParser
18
= new GenericHeaderParser<
EntityTagHeaderValue
>(false, GetEntityTagLength);
23
private 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>
75
public 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.
109
return 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,
128
public bool Compare(
EntityTagHeaderValue
? other, bool useStrongComparison)
146
/// Parses <paramref name="input"/> as a <see cref="
EntityTagHeaderValue
"/> value.
150
public 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>
162
public static bool TryParse(StringSegment input, [NotNullWhen(true)] out
EntityTagHeaderValue
? parsedValue)
169
/// Parses a sequence of inputs as a sequence of <see cref="
EntityTagHeaderValue
"/> values.
173
public 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.
183
public 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>
194
public 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>
205
public static bool TryParseStrictList(IList<string>? inputs, [NotNullWhen(true)] out IList<
EntityTagHeaderValue
>? parsedValues)
210
internal static int GetEntityTagLength(StringSegment input, int startIndex, out
EntityTagHeaderValue
? parsedValue)
RangeConditionHeaderValue.cs (6)
19
private
EntityTagHeaderValue
? _entityTag;
39
public RangeConditionHeaderValue(
EntityTagHeaderValue
entityTag)
64
/// Gets the <see cref="
EntityTagHeaderValue
"/> from header.
66
public
EntityTagHeaderValue
? EntityTag
149
EntityTagHeaderValue
? entityTag = null;
159
var entityTagLength =
EntityTagHeaderValue
.GetEntityTagLength(input, current, out entityTag);