Owin对Asp.net Web的扩展

类库Microsoft.Owin.Host.SystemWeb

扩展HttpContext以及HttpRequest ,新增了方法GetOwinContext

  //
// Summary:
// Provides extension methods for System.Web.HttpContext.
public static class HttpContextExtensions
{
//
// Summary:
// Gets the Microsoft.Owin.IOwinContext for the current request.
//
// Parameters:
// context:
public static IOwinContext GetOwinContext(this HttpContext context);
//
// Summary:
// Gets the Microsoft.Owin.IOwinContext for the current request.
//
// Parameters:
// request:
public static IOwinContext GetOwinContext(this HttpRequest request);
}

实际调用

 HttpContext.Current.GetOwinContext();
HttpContext.Current.Request.GetOwinContext();
上一篇:ON_UPDATE_COMMAND_UI和ON_COMMAND有什么区别?


下一篇:5-1 json模块