27 references to ParsingResult
Microsoft.AspNetCore.HeaderParsing (10)
HeaderParsingFeature.cs (9)
57
public bool TryGetHeaderValue<T>(HeaderKey<T> header, [NotNullWhen(true)] out T? value, out
ParsingResult
result)
112
Success =
ParsingResult
.Success,
113
Error =
ParsingResult
.Error,
114
NotFound =
ParsingResult
.NotFound,
135
public bool Process(HeaderParsingFeature feature, HeaderKey<T> header, out T? value, out
ParsingResult
result)
150
result = (
ParsingResult
)_state;
151
return result ==
ParsingResult
.Success;
189
result = (
ParsingResult
)_state;
191
return result ==
ParsingResult
.Success;
HeaderParsingHttpRequestExtensions.cs (1)
62
public static bool TryGetHeaderValue<T>(this HttpRequest request, HeaderKey<T> header, [NotNullWhen(true)] out T? value, out
ParsingResult
result)
Microsoft.AspNetCore.HeaderParsing.Tests (17)
HeaderParsingExtensionsTests.cs (3)
112
Assert.True(context.Request.TryGetHeaderValue(dateHeaderKey, out var parsedDate, out
var
result));
114
Assert.Equal(
ParsingResult
.Success, result);
118
Assert.Equal(
ParsingResult
.Success, result);
HeaderParsingFeatureTests.cs (14)
53
Assert.True(feature.TryGetHeaderValue(key, out var value, out
var
_));
72
Assert.True(feature.TryGetHeaderValue(key, out var value, out
var
result));
74
Assert.Equal(
ParsingResult
.Success, result);
80
Assert.Equal(
ParsingResult
.Success, result);
96
Assert.True(feature.TryGetHeaderValue(key, out var value, out
var
result));
98
Assert.Equal(
ParsingResult
.Success, result);
109
Assert.False(feature.TryGetHeaderValue(key, out var value, out
var
_));
126
Assert.True(feature.TryGetHeaderValue(key, out var value, out
var
result));
128
Assert.Equal(
ParsingResult
.Success, result);
144
Assert.False(feature.TryGetHeaderValue(key, out var value, out
var
result));
146
Assert.Equal(
ParsingResult
.Error, result);
202
Assert.True(feature.TryGetHeaderValue(key, out var value1, out
var
error1));
203
Assert.True(feature.TryGetHeaderValue(key, out var value2, out
var
error2));
204
Assert.True(feature2.TryGetHeaderValue(key, out var value3, out
var
error3));