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