13 overrides of TryParse
Microsoft.AspNetCore.HeaderParsing (13)
Parsers\CacheControlHeaderValueParser.cs (1)
14
public override bool
TryParse
(StringValues values, [NotNullWhen(true)] out CacheControlHeaderValue? result, [NotNullWhen(false)] out string? error)
Parsers\ContentDispositionHeaderValueParser.cs (1)
14
public override bool
TryParse
(StringValues values, [NotNullWhen(true)] out ContentDispositionHeaderValue? result, [NotNullWhen(false)] out string? error)
Parsers\CookieHeaderValueListParser.cs (1)
15
public override bool
TryParse
(StringValues values, [NotNullWhen(true)] out IReadOnlyList<CookieHeaderValue>? result, [NotNullWhen(false)] out string? error)
Parsers\DateTimeOffsetParser.cs (1)
15
public override bool
TryParse
(StringValues values, [NotNullWhen(true)] out DateTimeOffset result, [NotNullWhen(false)] out string? error)
Parsers\EntityTagHeaderValueListParser.cs (1)
15
public override bool
TryParse
(StringValues values, [NotNullWhen(true)] out IReadOnlyList<EntityTagHeaderValue>? result, [NotNullWhen(false)] out string? error)
Parsers\HostHeaderValueParser.cs (1)
13
public override bool
TryParse
(StringValues values, [NotNullWhen(true)] out HostHeaderValue result, [NotNullWhen(false)] out string? error)
Parsers\IPAddressListParser.cs (1)
16
public override bool
TryParse
(StringValues values, [NotNullWhen(true)] out IReadOnlyList<IPAddress>? result, [NotNullWhen(false)] out string? error)
Parsers\MediaTypeHeaderValueListParser.cs (1)
15
public override bool
TryParse
(StringValues values, [NotNullWhen(true)] out IReadOnlyList<MediaTypeHeaderValue>? result, [NotNullWhen(false)] out string? error)
Parsers\MediaTypeHeaderValueParser.cs (1)
14
public override bool
TryParse
(StringValues values, [NotNullWhen(true)] out MediaTypeHeaderValue? result, [NotNullWhen(false)] out string? error)
Parsers\RangeConditionHeaderValueParser.cs (1)
14
public override bool
TryParse
(StringValues values, [NotNullWhen(true)] out RangeConditionHeaderValue? result, [NotNullWhen(false)] out string? error)
Parsers\RangeHeaderValueParser.cs (1)
14
public override bool
TryParse
(StringValues values, [NotNullWhen(true)] out RangeHeaderValue? result, [NotNullWhen(false)] out string? error)
Parsers\StringWithQualityHeaderValueListParser.cs (1)
15
public override bool
TryParse
(StringValues values, [NotNullWhen(true)] out IReadOnlyList<StringWithQualityHeaderValue>? result, [NotNullWhen(false)] out string? error)
Parsers\UriParser.cs (1)
14
public override bool
TryParse
(StringValues values, [NotNullWhen(true)] out Uri? result, [NotNullWhen(false)] out string? error)
44 references to TryParse
Microsoft.AspNetCore.HeaderParsing (2)
HeaderKey.cs (1)
68
internal bool TryParse(StringValues values, out T? result, out string? error) => Parser.
TryParse
(values, out result, out error);
HeaderRegistry.cs (1)
50
if (!parser.
TryParse
(defValue, out var parsedValue, out var error))
Microsoft.AspNetCore.HeaderParsing.Tests (42)
ParserTests.cs (42)
21
Assert.True(HostHeaderValueParser.Instance.
TryParse
(sv, out var result, out var error));
31
Assert.False(HostHeaderValueParser.Instance.
TryParse
(sv, out var result, out var error));
39
Assert.True(DateTimeOffsetParser.Instance.
TryParse
(sv, out var result, out var error));
54
Assert.False(DateTimeOffsetParser.Instance.
TryParse
(sv, out var result, out var error));
62
Assert.False(DateTimeOffsetParser.Instance.
TryParse
(sv, out var result, out var error));
70
Assert.False(DateTimeOffsetParser.Instance.
TryParse
(sv, out var result, out var error));
78
Assert.True(CookieHeaderValueListParser.Instance.
TryParse
(sv, out var result, out var error));
89
Assert.True(CookieHeaderValueListParser.Instance.
TryParse
(sv, out var result, out var error));
102
Assert.False(CookieHeaderValueListParser.Instance.
TryParse
(sv, out var result, out var error));
111
Assert.False(CookieHeaderValueListParser.Instance.
TryParse
(sv, out var result, out var error));
120
Assert.True(CacheControlHeaderValueParser.Instance.
TryParse
(sv, out var result, out var error));
130
Assert.False(CacheControlHeaderValueParser.Instance.
TryParse
(sv, out var result, out var error));
139
Assert.False(CacheControlHeaderValueParser.Instance.
TryParse
(sv, out var result, out var error));
148
Assert.True(ContentDispositionHeaderValueParser.Instance.
TryParse
(sv, out var result, out var error));
158
Assert.False(ContentDispositionHeaderValueParser.Instance.
TryParse
(sv, out var result, out var error));
167
Assert.False(ContentDispositionHeaderValueParser.Instance.
TryParse
(sv, out var result, out var error));
176
Assert.True(MediaTypeHeaderValueParser.Instance.
TryParse
(sv, out var result, out var error));
186
Assert.False(MediaTypeHeaderValueParser.Instance.
TryParse
(sv, out var result, out var error));
195
Assert.False(MediaTypeHeaderValueParser.Instance.
TryParse
(sv, out var result, out var error));
204
Assert.True(MediaTypeHeaderValueListParser.Instance.
TryParse
(sv, out var result, out var error));
215
Assert.False(MediaTypeHeaderValueListParser.Instance.
TryParse
(sv, out var result, out var error));
224
Assert.True(EntityTagHeaderValueListParser.Instance.
TryParse
(sv, out var result, out var error));
234
Assert.False(EntityTagHeaderValueListParser.Instance.
TryParse
(sv, out var result, out var error));
243
Assert.True(StringWithQualityHeaderValueListParser.Instance.
TryParse
(sv, out var result, out var error));
253
Assert.True(StringWithQualityHeaderValueListParser.Instance.
TryParse
(sv, out var result, out var error));
265
Assert.False(StringWithQualityHeaderValueListParser.Instance.
TryParse
(sv, out var result, out var error));
274
Assert.True(UriParser.Instance.
TryParse
(sv, out var result, out var error));
284
Assert.False(UriParser.Instance.
TryParse
(sv, out var result, out var error));
293
Assert.False(UriParser.Instance.
TryParse
(sv, out var result, out var error));
302
Assert.True(RangeHeaderValueParser.Instance.
TryParse
(sv, out var result, out var error));
314
Assert.False(RangeHeaderValueParser.Instance.
TryParse
(sv, out var result, out var error));
323
Assert.False(RangeHeaderValueParser.Instance.
TryParse
(sv, out var result, out var error));
332
Assert.True(RangeConditionHeaderValueParser.Instance.
TryParse
(sv, out var result, out var error));
343
Assert.True(RangeConditionHeaderValueParser.Instance.
TryParse
(sv, out result, out error));
352
Assert.False(RangeConditionHeaderValueParser.Instance.
TryParse
(sv, out var result, out var error));
361
Assert.False(RangeConditionHeaderValueParser.Instance.
TryParse
(sv, out var result, out var error));
370
Assert.True(IPAddressListParser.Instance.
TryParse
(sv, out var result, out var error));
380
Assert.True(IPAddressListParser.Instance.
TryParse
(sv, out var result, out var error));
392
Assert.True(IPAddressListParser.Instance.
TryParse
(sv, out var result, out var error));
404
Assert.True(IPAddressListParser.Instance.
TryParse
(sv, out var result, out var error));
417
Assert.False(IPAddressListParser.Instance.
TryParse
(sv, out var result, out var error));
426
Assert.False(IPAddressListParser.Instance.
TryParse
(sv, out var result, out var error));