2 instantiations of CookieHeaderValue
Microsoft.AspNetCore.Http (1)
Features\RequestCookiesFeature.cs (1)
86
headers.Add(new
CookieHeaderValue
(pair.Key, pair.Value).ToString());
Microsoft.Net.Http.Headers (1)
CookieHeaderParser.cs (1)
30
cookieValue = new
CookieHeaderValue
(parsedName.Value, parsedValue.Value);
33 references to CookieHeaderValue
Microsoft.AspNetCore.HeaderParsing (5)
CommonHeaders.cs (1)
55
public static HeaderSetup<IReadOnlyList<
CookieHeaderValue
>> Cookie => new(HeaderNames.Cookie, CookieHeaderValueListParser.Instance);
Parsers\CookieHeaderValueListParser.cs (4)
11
internal sealed class CookieHeaderValueListParser : HeaderParser<IReadOnlyList<
CookieHeaderValue
>>
15
public override bool TryParse(StringValues values, [NotNullWhen(true)] out IReadOnlyList<
CookieHeaderValue
>? result, [NotNullWhen(false)] out string? error)
17
if (!
CookieHeaderValue
.TryParseList(values, out var parsedValue))
25
result = (IReadOnlyList<
CookieHeaderValue
>)parsedValue;
Microsoft.AspNetCore.Http.Extensions (6)
HeaderDictionaryTypeExtensions.cs (4)
159
private static IList<
CookieHeaderValue
> ParseCookieHeaderValue(IList<string> value) =>
160
CookieHeaderValue
.TryParseList(value, out var result) ? result : Array.Empty<
CookieHeaderValue
>();
245
else if (typeof(T) == typeof(
CookieHeaderValue
))
RequestHeaders.cs (2)
169
public IList<
CookieHeaderValue
> Cookie
173
return Headers.Cookie.GetList<
CookieHeaderValue
>();
Microsoft.Net.Http.Headers (22)
CookieHeaderParser.cs (2)
8
internal sealed class CookieHeaderParser : HttpHeaderParser<
CookieHeaderValue
>
15
public override bool TryParseValue(StringSegment value, ref int index, out
CookieHeaderValue
? cookieValue)
CookieHeaderValue.cs (18)
28
/// Initializes a new instance of <see cref="
CookieHeaderValue
"/>.
41
/// Initializes a new instance of <see cref="
CookieHeaderValue
"/>.
101
/// Parses <paramref name="input"/> as a <see cref="
CookieHeaderValue
"/> value.
105
public static
CookieHeaderValue
Parse(StringSegment input)
112
/// Attempts to parse the specified <paramref name="input"/> as a <see cref="
CookieHeaderValue
"/>.
116
/// <returns><see langword="true"/> if input is a valid <see cref="
CookieHeaderValue
"/>, otherwise <see langword="false"/>.</returns>
117
public static bool TryParse(StringSegment input, [NotNullWhen(true)] out
CookieHeaderValue
? parsedValue)
124
/// Parses a sequence of inputs as a sequence of <see cref="
CookieHeaderValue
"/> values.
128
public static IList<
CookieHeaderValue
> ParseList(IList<string>? inputs)
134
/// Parses a sequence of inputs as a sequence of <see cref="
CookieHeaderValue
"/> values using string parsing rules.
138
public static IList<
CookieHeaderValue
> ParseStrictList(IList<string>? inputs)
144
/// Attempts to parse the sequence of values as a sequence of <see cref="
CookieHeaderValue
"/>.
148
/// <returns><see langword="true"/> if all inputs are valid <see cref="
CookieHeaderValue
"/>, otherwise <see langword="false"/>.</returns>
149
public static bool TryParseList(IList<string>? inputs, [NotNullWhen(true)] out IList<
CookieHeaderValue
>? parsedValues)
155
/// Attempts to parse the sequence of values as a sequence of <see cref="
CookieHeaderValue
"/> using string parsing rules.
160
public static bool TryParseStrictList(IList<string>? inputs, [NotNullWhen(true)] out IList<
CookieHeaderValue
>? parsedValues)
196
var
other = obj as
CookieHeaderValue
;
SetCookieHeaderValue.cs (2)
90
CookieHeaderValue
.CheckNameFormat(value, nameof(value));
103
CookieHeaderValue
.CheckValueFormat(value, nameof(value));