1 override of Form
Microsoft.AspNetCore.Http (1)
Internal\DefaultHttpRequest.cs (1)
155public override IFormCollection Form
54 writes to Form
Microsoft.AspNetCore.Antiforgery.Test (8)
DefaultAntiforgeryTokenStoreTest.cs (8)
78httpContext.Request.Form = FormCollection.Empty; 102httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues> 131httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues> 160httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues> 190httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues> 221httpContext.Request.Form = null!; 248httpContext.Request.Form = null!; 273httpContext.Request.Form = FormCollection.Empty;
Microsoft.AspNetCore.Http.Extensions.Tests (15)
RequestDelegateFactoryTests.cs (2)
635httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues> 663httpContext.Request.Form = new FormCollection(null);
RequestDelegateFactoryTests.FormMapping.cs (8)
32httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues> 79httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues> 127httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues> 160httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues> 183httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues> 213httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues> 252httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues> 297httpContext.Request.Form = new FormCollection(new() { { "Description", "A test file" } }, formFiles);
RequestDelegateGenerator\CompileTimeCreationTests.cs (1)
780httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues>
RequestDelegateGenerator\RequestDelegateCreationTests.Arrays.cs (1)
767httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues>
RequestDelegateGenerator\RequestDelegateCreationTests.cs (1)
591httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues>
RequestDelegateGenerator\RequestDelegateCreationTests.Forms.cs (1)
897httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues>
RequestDelegateGenerator\RequestDelegateCreationTests.Logging.cs (1)
36httpContext.Request.Form = new FormCollection(null);
Microsoft.AspNetCore.Mvc.Core.Test (7)
Filters\RequestFormLimitsFilterTest.cs (1)
66authorizationFilterContext.HttpContext.Request.Form = new FormCollection(null);
ModelBinding\FormFileValueProviderFactoryTest.cs (1)
117context.Request.Form = new FormCollection(new Dictionary<string, StringValues>(), new FormFileCollection());
ModelBinding\FormFileValueProviderTest.cs (3)
19httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues>(), formFiles); 38httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues>(), formFiles); 57httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues>(), formFiles);
ModelBinding\FormValueProviderFactoryTest.cs (1)
108context.Request.Form = new FormCollection(new Dictionary<string, StringValues>());
ModelBinding\JQueryFormValueProviderFactoryTest.cs (1)
193context.Request.Form = new FormCollection(formValues ?? new Dictionary<string, StringValues>());
Microsoft.AspNetCore.Mvc.IntegrationTests (24)
BindingSourceMetadataProviderIntegrationTest.cs (2)
36request.Form = new FormCollection(new Dictionary<string, StringValues> 127request.Form = formCollection;
CollectionModelBinderIntegrationTest.cs (3)
604request.Form = formCollection; 661request.Form = formCollection; 946request.Form = new FormCollection(formContent);
ComplexRecordIntegrationTest.cs (1)
4226request.Form = formCollection;
ComplexTypeIntegrationTestBase.cs (1)
3725request.Form = formCollection;
DictionaryModelBinderIntegrationTest.cs (7)
290request.Form = new FormCollection(impliedPrefixDictionary); 295request.Form = new FormCollection(reversedImpliedPrefixDictionary); 300request.Form = new FormCollection(longFormDictionary); 305request.Form = new FormCollection(longerFormDictionary); 310request.Form = new FormCollection(longestFormDictionary); 315request.Form = new FormCollection(noPrefixDictionary); 320request.Form = new FormCollection(reversedNoPrefixDictionary);
ExcludeBindingMetadataProviderIntegrationTest.cs (2)
37request.Form = new FormCollection(new Dictionary<string, StringValues> 86request.Form = new FormCollection(new Dictionary<string, StringValues>
FormCollectionModelBindingIntegrationTest.cs (1)
163request.Form = formCollection;
FormFileModelBindingIntegrationTest.cs (1)
1253request.Form = formCollection;
ModelPrefixSelectionIntegrationTest.cs (4)
38request.Form = new FormCollection(new Dictionary<string, StringValues>() 87request.Form = new FormCollection(new Dictionary<string, StringValues>() 175request.Form = new FormCollection(new Dictionary<string, StringValues>() 221request.Form = new FormCollection(new Dictionary<string, StringValues>()
SimpleTypeModelBinderIntegrationTest.cs (1)
674request.Form = new FormCollection(personStore);
TryUpdateModelIntegrationTest.cs (1)
1279request.Form = formCollection;
43 references to Form
Microsoft.AspNetCore.Components.Endpoints (1)
RazorComponentEndpointInvoker.cs (1)
245if (context.Request.Form.TryGetValue("_handler", out var value))
Microsoft.AspNetCore.Http.Extensions (1)
RequestDelegateFactory.cs (1)
99private static readonly MemberExpression FormExpr = Expression.Property(HttpRequestExpr, typeof(HttpRequest).GetProperty(nameof(HttpRequest.Form))!);
Microsoft.AspNetCore.Http.Extensions.Tests (24)
RequestDelegateGenerator\RequestDelegateCreationTests.Forms.cs (24)
41Assert.Equal(httpContext.Request.Form.Files, httpContext.Items["formFiles"]); 76Assert.Equal(httpContext.Request.Form.Files, httpContext.Items["formFiles"]); 111Assert.Equal(httpContext.Request.Form.Files["file"], httpContext.Items["formFiles"]); 149Assert.Equal(httpContext.Request.Form.Files["file"], httpContext.Items["formFiles"]); 187Assert.Equal(httpContext.Request.Form.Files["file1"], httpContext.Items["file1"]); 192Assert.Equal(httpContext.Request.Form.Files["file2"], httpContext.Items["file2"]); 228Assert.Equal(httpContext.Request.Form.Files["file1"], httpContext.Items["file1"]); 231Assert.Equal(httpContext.Request.Form.Files["file2"], httpContext.Items["file2"]); 265Assert.Equal(httpContext.Request.Form.Files["my_file"], httpContext.Items["formFiles"]); 302Assert.Equal(httpContext.Request.Form.Files["file"], httpContext.Items["formFiles"]); 408Assert.Equal(httpContext.Request.Form.Files, httpContext.Items["formFiles"]); 412Assert.Equal(httpContext.Request.Form.Files["file"], httpContext.Items["file"]); 459Assert.Equal(httpContext.Request.Form.Files["file"], httpContext.Items["file"]); 504Assert.Equal(httpContext.Request.Form.Files["file"], httpContext.Items["file"]); 556Assert.Equal(httpContext.Request.Form, httpContext.Items["formFiles"]); 603Assert.Equal(httpContext.Request.Form, httpContext.Items["formFiles"]); 650Assert.Equal(httpContext.Request.Form["message"][0], httpContext.Items["message"]); 679Assert.Equal(httpContext.Request.Form["message"][0], httpContext.Items["message"]); 682Assert.Equal(httpContext.Request.Form["name"][0], httpContext.Items["name"]); 712Assert.Equal(httpContext.Request.Form["message"][0], httpContext.Items["message"]); 742Assert.Equal(httpContext.Request.Form["message"][0], httpContext.Items["message"]); 772Assert.Equal(httpContext.Request.Form["message"][0], httpContext.Items["message"]); 838Assert.Equal(httpContext.Request.Form.Files, formFilesArgument); 842Assert.Equal(httpContext.Request.Form, formArgument);
Microsoft.AspNetCore.Http.Tests (7)
Features\FormFeatureTests.cs (7)
211var formCollection = context.Request.Form; 246var formCollection = context.Request.Form; 292Assert.Same(formCollection, context.Request.Form); 331var formCollection = context.Request.Form; 377Assert.Same(formCollection, context.Request.Form); 425Assert.Same(formCollection, context.Request.Form); 574Assert.Same(formCollection, context.Request.Form);
Microsoft.AspNetCore.Mvc.Core (1)
RequestFormLimitsAttribute.cs (1)
13/// Sets the specified limits to the <see cref="HttpRequest.Form"/>.
Microsoft.AspNetCore.Mvc.Core.Test (1)
ModelBinding\FormFileValueProviderFactoryTest.cs (1)
48var files = (FormFileCollection)context.ActionContext.HttpContext.Request.Form.Files;
Microsoft.AspNetCore.Mvc.IntegrationTests (3)
ComplexRecordIntegrationTest.cs (1)
4218fileCollection = (FormFileCollection)request.Form.Files;
ComplexTypeIntegrationTestBase.cs (1)
3717fileCollection = (FormFileCollection)request.Form.Files;
FormFileModelBindingIntegrationTest.cs (1)
1272var fileCollection = (FormFileCollection)request.Form.Files;
Microsoft.AspNetCore.Routing.FunctionalTests (1)
MinimalFormTests.cs (1)
363var form = context.Request.Form;
Microsoft.AspNetCore.Routing.Tests (4)
EndpointRoutingMiddlewareFormOptionsTest.cs (4)
44var _ = httpContext.Request.Form; // Trigger the form feature. 78var _ = httpContext.Request.Form; // Trigger the form feature. 116var _ = httpContext.Request.Form; // Trigger the form feature. 152var _ = httpContext.Request.Form; // Trigger the form feature.