public static HttpContext current { get { return contextbase.current as HttpContext; } Set { contextbase.current = (object) value; } }
Internal class Contextbase { Internal static object current { get { return} Callcontext.hostcontext; } [SecurityPermission (SecurityAction.Demand, Unrestricted = True)] Set { callcontext.hostcontext = value; } } [Targetedpatchingoptout ("Performance critical to-inline this type of method across NGen image boundaries")] Public Contextbase () { } internal Static object Switchcontext (object Newcontext) { Object Hostcontext = Callcontext.hostcontext; if (hostcontext! = newcontext) callcontext.hostcontext = Newcontext; return hostcontext; } }
public static Object Hostcontext {[System.Security.SecurityCritical]//auto-generated GE t {Object HC; Illogicalcallcontext ILCC = Thread.CurrentThread.GetIllogicalCallContext (); HC = ILCC. Hostcontext; if (HC = = null) {LogicalCallContext LCC = Getlogicalcallcontext (); HC = LCC. Hostcontext; } return HC; } [System.Security.SecurityCritical]//auto-generated_required set {i F (value is ILogicalThreadAffinative) {Illogicalcallcontext ILCC = Thread.currentthrea D.getillogicalcallcontext (); ILCC. Hostcontext = null; LogicalCallContext LCC = Getlogicalcallcontext (); Lcc. Hostcontext = value; } else { LogicalCallContext LCC = Getlogicalcallcontext (); Lcc. Hostcontext = null; Illogicalcallcontext ILCC = Thread.CurrentThread.GetIllogicalCallContext (); ILCC. Hostcontext = value; } } }
Internal Illogicalcallcontext getillogicalcallcontext () { return executioncontext.illogicalcallcontext;
System.Web.HttpContext.Current Tracking Analysis