1 implementation of IFormFeature
Microsoft.AspNetCore.Http (1)
Features\FormFeature.cs (1)
17public class FormFeature : IFormFeature
80 references to IFormFeature
Microsoft.AspNetCore.Http (7)
Features\FormFeature.cs (1)
15/// Default implementation for <see cref="IFormFeature"/>.
Internal\DefaultHttpRequest.cs (3)
18private static readonly Func<DefaultHttpRequest, IFormFeature> _newFormFeature = r => new FormFeature(r, r._context.FormOptions ?? FormOptions.Default, r._context.GetEndpoint()); 55private IFormFeature FormFeature => 181public IFormFeature? Form;
RequestFormReaderExtensions.cs (3)
33var formFeature = features.Get<IFormFeature>(); 37features.Set<IFormFeature>(new FormFeature(request, options));
Microsoft.AspNetCore.Http.Abstractions (1)
HttpRequest.cs (1)
178public IFormCollection? Form => _request.HttpContext.Features.Get<IFormFeature>()?.Form;
Microsoft.AspNetCore.Http.Tests (38)
Features\FormFeatureTests.cs (38)
21context.Features.Set<IFormFeature>(formFeature); 58IFormFeature formFeature = new FormFeature(context.Request, new FormOptions() { BufferBody = bufferRequest }); 59context.Features.Set<IFormFeature>(formFeature); 72formFeature = context.Features.Get<IFormFeature>(); 100IFormFeature formFeature = new FormFeature(context.Request, new FormOptions() { BufferBody = bufferRequest }); 101context.Features.Set<IFormFeature>(formFeature); 109formFeature = context.Features.Get<IFormFeature>(); 208IFormFeature formFeature = new FormFeature(context.Request, new FormOptions() { BufferBody = bufferRequest }); 209context.Features.Set<IFormFeature>(formFeature); 216formFeature = context.Features.Get<IFormFeature>(); 243IFormFeature formFeature = new FormFeature(context.Request, new FormOptions() { BufferBody = bufferRequest }); 244context.Features.Set<IFormFeature>(formFeature); 251formFeature = context.Features.Get<IFormFeature>(); 280IFormFeature formFeature = new FormFeature(context.Request, new FormOptions() { BufferBody = bufferRequest }); 281context.Features.Set<IFormFeature>(formFeature); 288formFeature = context.Features.Get<IFormFeature>(); 328IFormFeature formFeature = new FormFeature(context.Request, new FormOptions() { BufferBody = bufferRequest }); 329context.Features.Set<IFormFeature>(formFeature); 336formFeature = context.Features.Get<IFormFeature>(); 365IFormFeature formFeature = new FormFeature(context.Request, new FormOptions() { BufferBody = bufferRequest }); 366context.Features.Set<IFormFeature>(formFeature); 373formFeature = context.Features.Get<IFormFeature>(); 413IFormFeature formFeature = new FormFeature(context.Request, new FormOptions() { BufferBody = bufferRequest }); 414context.Features.Set<IFormFeature>(formFeature); 421formFeature = context.Features.Get<IFormFeature>(); 465IFormFeature formFeature = new FormFeature(context.Request, new FormOptions() { BufferBody = bufferRequest, ValueCountLimit = 2 }); 466context.Features.Set<IFormFeature>(formFeature); 489IFormFeature formFeature = new FormFeature(context.Request, new FormOptions() { BufferBody = bufferRequest, ValueCountLimit = 2 }); 490context.Features.Set<IFormFeature>(formFeature); 513IFormFeature formFeature = new FormFeature(context.Request, new FormOptions() { BufferBody = bufferRequest, ValueCountLimit = 2 }); 514context.Features.Set<IFormFeature>(formFeature); 537IFormFeature formFeature = new FormFeature(context.Request, new FormOptions() { BufferBody = bufferRequest, ValueCountLimit = 2 }); 538context.Features.Set<IFormFeature>(formFeature); 562IFormFeature formFeature = new FormFeature(context.Request, new FormOptions() { BufferBody = bufferRequest }); 563context.Features.Set<IFormFeature>(formFeature); 570formFeature = context.Features.Get<IFormFeature>(); 605IFormFeature formFeature = new FormFeature(context.Request, new FormOptions()); 606context.Features.Set<IFormFeature>(formFeature);
Microsoft.AspNetCore.Mvc.Core (3)
Filters\RequestFormLimitsFilter.cs (3)
35var formFeature = features.Get<IFormFeature>(); 40features.Set<IFormFeature>(new FormFeature(context.HttpContext.Request, FormOptions));
Microsoft.AspNetCore.Mvc.Core.Test (8)
Filters\RequestFormLimitsFilterTest.cs (8)
25authorizationFilterContext.HttpContext.Features.Set<IFormFeature>(null); 31var formFeature = authorizationFilterContext.HttpContext.Features.Get<IFormFeature>(); 45authorizationFilterContext.HttpContext.Features.Set<IFormFeature>(oldFormFeature); 51var actualFormFeature = authorizationFilterContext.HttpContext.Features.Get<IFormFeature>(); 91authorizationFilterContext.HttpContext.Features.Set<IFormFeature>(null); 116authorizationFilterContext.HttpContext.Features.Set<IFormFeature>(
Microsoft.AspNetCore.Routing.FunctionalTests (1)
MinimalFormTests.cs (1)
377var form = context.Features.Get<IFormFeature>()?.ReadForm();
Microsoft.AspNetCore.Routing.Tests (10)
EndpointRoutingMiddlewareFormOptionsTest.cs (10)
46var formFeature = httpContext.Features.Get<IFormFeature>(); 80var formFeature = httpContext.Features.Get<IFormFeature>(); 118var formFeature = httpContext.Features.Get<IFormFeature>(); 154var formFeature = httpContext.Features.Get<IFormFeature>(); 185var formFeature = httpContext.Features.Get<IFormFeature>();
Microsoft.AspNetCore.Server.IIS (1)
Core\IISHttpContext.Features.cs (1)
18private static readonly Type IFormFeatureType = typeof(global::Microsoft.AspNetCore.Http.Features.IFormFeature);
Microsoft.AspNetCore.Server.Kestrel.Core (9)
Internal\Http\HttpProtocol.Generated.cs (9)
65internal protected IFormFeature? _currentIFormFeature; 236else if (key == typeof(IFormFeature)) 388else if (key == typeof(IFormFeature)) 390_currentIFormFeature = (IFormFeature?)value; 542else if (typeof(TFeature) == typeof(IFormFeature)) 544feature = Unsafe.As<IFormFeature?, TFeature?>(ref _currentIFormFeature); 702else if (typeof(TFeature) == typeof(IFormFeature)) 704_currentIFormFeature = Unsafe.As<TFeature?, IFormFeature?>(ref feature); 852yield return new KeyValuePair<Type, object>(typeof(IFormFeature), _currentIFormFeature);
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (2)
HttpProtocolFeatureCollection.cs (2)
89public IFormFeature Get_IFormFeature() 91return _collection.Get<IFormFeature>();