16 writes to Name
Microsoft.AspNetCore.Http.Extensions.Tests (1)
HeaderDictionaryTypeExtensionsTest.cs (1)
63var expected = new ContentDispositionHeaderValue("form-data") { Name = "\"fieldName\"" };
Microsoft.Net.Http.Headers.Tests (15)
ContentDispositionHeaderValueTest.cs (15)
76contentDisposition.Name = "myname"; 81contentDisposition.Name = null; 84contentDisposition.Name = null; // It's OK to set it again to null; no exception. 98contentDisposition.Name = "new_name"; 397contentDisposition.Name = "myname"; 411contentDisposition.Name = null; 434contentDisposition2.Name = "myname"; 453contentDisposition2.Name = "myName"; 485expected.Name = "myName"; 489expected.Name = null; 521expected.Name = "myName"; 545{ "inline;name=value", new ContentDispositionHeaderValue("inline") { Name = "value" } }, 546{ "inline;name=value;", new ContentDispositionHeaderValue("inline") { Name = "value" } }, 547{ "inline;name=value;", new ContentDispositionHeaderValue("inline") { Name = "value" } }, 566{ @"attachment; name=""foo-%41.html""", new ContentDispositionHeaderValue("attachment") { Name = @"""foo-%41.html""" } }, // 'attachment', specifying a <i>name</i> parameter of foo-%41.html. (this test was added to observe the behavior of the (unspecified) treatment of ""name"" as synonym for ""filename""; see <a href=""http://www.imc.org/ietf-smtp/mail-archive/msg05023.html"">Ned Freed's summary</a> where this comes from in MIME messages)
8 references to Name
Microsoft.AspNetCore.WebUtilities (2)
FileMultipartSection.cs (1)
40Name = HeaderUtilities.RemoveQuotes(_contentDispositionHeader.Name).ToString();
FormMultipartSection.cs (1)
39Name = HeaderUtilities.RemoveQuotes(_contentDispositionHeader.Name).ToString();
Microsoft.Net.Http.Headers.Tests (6)
ContentDispositionHeaderValueTest.cs (6)
47Assert.Null(contentDisposition.Name.Value); 77Assert.Equal("myname", contentDisposition.Name.AsSpan()); 82Assert.Null(contentDisposition.Name.Value); 99Assert.Equal("new_name", contentDisposition.Name.AsSpan()); 104Assert.Null(contentDisposition.Name.Value); 648Assert.Equal(expectedName.AsSpan(), result.Name);