Пример #1
0
 public static void ResetCurrent()
 {
     if (SimHttpContext.current != null)
     {
         SimHttpContext.current     = null;
         ShimHttpContext.CurrentGet = () => null;
     }
 }
Пример #2
0
        private static SimHttpContext SetCurrent()
        {
            if (SimHttpContext.current == null)
            {
                SimHttpContext.current = new SimHttpContext();
            }
            ShimHttpContext.CurrentGet = () => SimHttpContext.Current.Instance;
            ShimRuntime.RegisterStateCleaner(delegate
            {
                SimHttpContext.current = null;
            });

            return(SimHttpContext.current);
        }
Пример #3
0
 public static void Initialize()
 {
     ShimHttpContext.BehaveAsNotImplemented();
     SimHttpContext.SetCurrent();
 }