16 writes to Name
Microsoft.AspNetCore.Http.Extensions.Tests (1)
HeaderDictionaryTypeExtensionsTest.cs (1)
63
var expected = new ContentDispositionHeaderValue("form-data") {
Name
= "\"fieldName\"" };
Microsoft.Net.Http.Headers.Tests (15)
ContentDispositionHeaderValueTest.cs (15)
76
contentDisposition.
Name
= "myname";
81
contentDisposition.
Name
= null;
84
contentDisposition.
Name
= null; // It's OK to set it again to null; no exception.
98
contentDisposition.
Name
= "new_name";
397
contentDisposition.
Name
= "myname";
411
contentDisposition.
Name
= null;
434
contentDisposition2.
Name
= "myname";
453
contentDisposition2.
Name
= "myName";
485
expected.
Name
= "myName";
489
expected.
Name
= null;
521
expected.
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)
40
Name = HeaderUtilities.RemoveQuotes(_contentDispositionHeader.
Name
).ToString();
FormMultipartSection.cs (1)
39
Name = HeaderUtilities.RemoveQuotes(_contentDispositionHeader.
Name
).ToString();
Microsoft.Net.Http.Headers.Tests (6)
ContentDispositionHeaderValueTest.cs (6)
47
Assert.Null(contentDisposition.
Name
.Value);
77
Assert.Equal("myname", contentDisposition.
Name
.AsSpan());
82
Assert.Null(contentDisposition.
Name
.Value);
99
Assert.Equal("new_name", contentDisposition.
Name
.AsSpan());
104
Assert.Null(contentDisposition.
Name
.Value);
648
Assert.Equal(expectedName.AsSpan(), result.
Name
);