Example #1
0
        public RuntimePolicy Execute(IRuntimePolicyContext policyContext)
        {
            if (policyContext == null)
            {
                throw new ArgumentNullException("policyContext");
            }

            var httpContext = policyContext.GetRequestContext <HttpContextBase>();

            if (httpContext.Request.IsLocal)
            {
                return(RuntimePolicy.On);
            }

            return(RuntimePolicy.Off);
        }
Example #2
0
 public RuntimePolicy Execute(IRuntimePolicyContext policyContext)
 {
     return(Execute(policyContext.GetRequestContext <HttpContextBase>()));
 }
 public RuntimePolicy Execute(IRuntimePolicyContext policyContext)
 {
     return Execute(policyContext.GetRequestContext<HttpContextBase>());
 }
Example #4
0
 public static HttpContextBase GetHttpContext(this IRuntimePolicyContext policyContext)
 {
     return(policyContext.GetRequestContext <HttpContextBase>());
 }