25 references to Extensions
Microsoft.Net.Http.Headers (1)
CacheControlHeaderValue.cs (1)
685
cc.
Extensions
.Add(nameValue); // success is always true
Microsoft.Net.Http.Headers.Tests (24)
CacheControlHeaderValueTest.cs (24)
60
Assert.NotNull(cacheControl.
Extensions
);
61
Assert.Throws<ArgumentNullException>(() => cacheControl.
Extensions
.Add(null!));
62
cacheControl.
Extensions
.Add(new NameValueHeaderValue("name", "value"));
63
Assert.Single(cacheControl.
Extensions
);
64
Assert.Equal(new NameValueHeaderValue("name", "value"), cacheControl.
Extensions
.First());
97
cacheControl.
Extensions
.Add(new NameValueHeaderValue("custom"));
98
cacheControl.
Extensions
.Add(new NameValueHeaderValue("customName", "customValue"));
102
cacheControl.
Extensions
.Add(new NameValueHeaderValue("custom"));
234
cacheControl4.
Extensions
.Add(new NameValueHeaderValue("custom"));
237
cacheControl5.
Extensions
.Add(new NameValueHeaderValue("customN", "customV"));
238
cacheControl5.
Extensions
.Add(new NameValueHeaderValue("custom"));
241
cacheControl4.
Extensions
.Add(new NameValueHeaderValue("customN", "customV"));
364
cacheControl5.
Extensions
.Add(new NameValueHeaderValue("custom"));
367
cacheControl6.
Extensions
.Add(new NameValueHeaderValue("customN", "customV"));
368
cacheControl6.
Extensions
.Add(new NameValueHeaderValue("custom"));
371
cacheControl5.
Extensions
.Add(new NameValueHeaderValue("customN", "customV"));
398
expected.
Extensions
.Add(new NameValueHeaderValue("custom"));
407
expected.
Extensions
.Add(new NameValueHeaderValue("c", "d"));
408
expected.
Extensions
.Add(new NameValueHeaderValue("a", "b"));
418
expected.
Extensions
.Add(new NameValueHeaderValue("custom", ""));
492
expected.
Extensions
.Add(new NameValueHeaderValue("custom"));
496
expected.
Extensions
.Add(new NameValueHeaderValue("custom", ""));
529
expected.
Extensions
.Add(new NameValueHeaderValue("custom"));
533
expected.
Extensions
.Add(new NameValueHeaderValue("custom", ""));