26 references to HttpContext
Microsoft.AspNetCore.Mvc.Core (10)
ModelBinding\Binders\BinderTypeModelBinder.cs (1)
44var requestServices = bindingContext.HttpContext.RequestServices;
ModelBinding\Binders\BodyModelBinder.cs (1)
106var httpContext = bindingContext.HttpContext;
ModelBinding\Binders\CancellationTokenModelBinder.cs (1)
24var model = (object)bindingContext.HttpContext.RequestAborted;
ModelBinding\Binders\FormCollectionModelBinder.cs (1)
40var request = bindingContext.HttpContext.Request;
ModelBinding\Binders\FormFileModelBinder.cs (1)
140var request = bindingContext.HttpContext.Request;
ModelBinding\Binders\HeaderModelBinder.cs (3)
62var request = bindingContext.HttpContext.Request; 102var request = bindingContext.HttpContext.Request; 125var request = bindingContext.HttpContext.Request;
ModelBinding\Binders\KeyedServicesModelBinder.cs (1)
24var keyedServices = bindingContext.HttpContext.RequestServices as IKeyedServiceProvider;
ModelBinding\Binders\ServicesModelBinder.cs (1)
24var requestServices = bindingContext.HttpContext.RequestServices;
Microsoft.AspNetCore.Mvc.Core.Test (16)
ModelBinding\Binders\BinderTypeModelBinderTest.cs (1)
39bindingContext.HttpContext.RequestServices = serviceProvider;
ModelBinding\Binders\BodyModelBinderTests.cs (2)
604bindingContext.HttpContext.Request.ContentType = "application/json"; 633bindingContext.HttpContext.Request.ContentType = "multipart/form-data";
ModelBinding\Binders\CancellationTokenModelBinderTests.cs (1)
23Assert.Equal(bindingContext.HttpContext.RequestAborted, bindingContext.Result.Model);
ModelBinding\Binders\HeaderModelBinderTests.cs (12)
28bindingContext.HttpContext.Request.Headers.Add(header, new[] { headerValue }); 50bindingContext.HttpContext.Request.Headers.Add(header, new[] { headerValue }); 77bindingContext.HttpContext.Request.Headers.Add(header, new[] { headerValue }); 96bindingContext.HttpContext.Request.Headers.Add("Header", new[] { headerValue }); 146bindingContext.HttpContext.Request.Headers.Add("Header", headerValue); 206bindingContext.HttpContext.Request.Headers.Add("Header", new[] { headerValue }); 223bindingContext.HttpContext.Request.Headers.Add("Header", "application/json,text/json"); 240bindingContext.HttpContext.Request.Headers.Add("Header", "application/json,text/json"); 264bindingContext.HttpContext.Request.Headers.Add("Header", "application/json,text/json"); 286bindingContext.HttpContext.Request.Headers.Add("Header", headerValue); 310bindingContext.HttpContext.Request.Headers.Add("Header", headerValue); 374var factory = TestModelBinderFactory.Create(bindingContext.HttpContext.RequestServices);