parent
5a80435534
commit
9c81b95d1b
|
|
@ -151,7 +151,7 @@ namespace MvcSample.Web
|
|||
|
||||
public void Raw()
|
||||
{
|
||||
Context.Response.WriteAsync("Hello World raw");
|
||||
HttpContext.Response.WriteAsync("Hello World raw");
|
||||
}
|
||||
|
||||
public ActionResult Language()
|
||||
|
|
|
|||
|
|
@ -45,9 +45,9 @@ namespace Microsoft.AspNet.Mvc
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="HttpContext"/> for the executing action.
|
||||
/// Gets the <see cref="Http.HttpContext"/> for the executing action.
|
||||
/// </summary>
|
||||
public HttpContext Context
|
||||
public HttpContext HttpContext
|
||||
{
|
||||
get
|
||||
{
|
||||
|
|
@ -206,7 +206,7 @@ namespace Microsoft.AspNet.Mvc
|
|||
{
|
||||
get
|
||||
{
|
||||
return Context?.User;
|
||||
return HttpContext?.User;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -502,7 +502,7 @@ namespace Microsoft.AspNet.Mvc
|
|||
controller.ActionContext = actionContext;
|
||||
|
||||
// Assert
|
||||
Assert.Equal(actionContext.HttpContext, controller.Context);
|
||||
Assert.Equal(actionContext.HttpContext, controller.HttpContext);
|
||||
Assert.Equal(actionContext.RouteData, controller.RouteData);
|
||||
Assert.Equal(actionContext.ModelState, controller.ModelState);
|
||||
}
|
||||
|
|
@ -528,7 +528,7 @@ namespace Microsoft.AspNet.Mvc
|
|||
controller.ActionContext = actionContext;
|
||||
|
||||
// Assert
|
||||
Assert.Equal(httpContext.Object, controller.Context);
|
||||
Assert.Equal(httpContext.Object, controller.HttpContext);
|
||||
Assert.Equal(routeData.Object, controller.RouteData);
|
||||
Assert.Equal(actionContext.ModelState, controller.ModelState);
|
||||
Assert.Equal(actionDescriptor.Object, actionContext.ActionDescriptor);
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace ActivatorWebSite
|
|||
// This verifies that ModelState and Context are activated.
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
await Context.Response.WriteAsync("Hello world");
|
||||
await HttpContext.Response.WriteAsync("Hello world");
|
||||
}
|
||||
|
||||
return new EmptyResult();
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ namespace HtmlGenerationWebSite.Controllers
|
|||
var identity = new ClaimsIdentity();
|
||||
identity.AddClaim(new Claim(ClaimsIdentity.DefaultNameClaimType, id));
|
||||
|
||||
Context.User = new ClaimsPrincipal(identity);
|
||||
HttpContext.User = new ClaimsPrincipal(identity);
|
||||
ViewData["CorrelationId"] = correlationId;
|
||||
return View();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue