コード例 #1
0
        public static IHttpHandlerSource DetermineHandlerSource(SessionStateRequirement sessionStateRequirement, BehaviorChain chain)
        {
            if (chain.IsAsynchronous())
            {
                return(sessionStateRequirement == SessionStateRequirement.RequiresSessionState
                           ? (IHttpHandlerSource) new AsynchronousHttpHandlerSource()
                           : new SessionlessAsynchronousHttpHandlerSource());
            }

            return(sessionStateRequirement == SessionStateRequirement.RequiresSessionState
                       ? (IHttpHandlerSource) new SynchronousHttpHandlerSource()
                       : new SessionlessSynchronousHttpHandlerSource());
        }
コード例 #2
0
        public static IHttpHandlerSource DetermineHandlerSource(SessionStateRequirement sessionStateRequirement, BehaviorChain chain)
        {
            if (chain.IsAsynchronous())
            {
                return sessionStateRequirement == SessionStateRequirement.RequiresSessionState
                           ? (IHttpHandlerSource) new AsynchronousHttpHandlerSource()
                           : new SessionlessAsynchronousHttpHandlerSource();
            }

            return sessionStateRequirement == SessionStateRequirement.RequiresSessionState
                       ? (IHttpHandlerSource)new SynchronousHttpHandlerSource()
                       : new SessionlessSynchronousHttpHandlerSource();
        }
コード例 #3
0
 public static IBehaviorInvoker DetermineInvoker(IServiceFactory factory, BehaviorChain chain)
 {
     return(chain.IsAsynchronous() ? new AsyncBehaviorInvoker(factory, chain) : new BehaviorInvoker(factory, chain));
 }
コード例 #4
0
 public static IBehaviorInvoker DetermineInvoker(IBehaviorFactory factory, BehaviorChain chain)
 {
     return chain.IsAsynchronous() ? new AsyncBehaviorInvoker(factory, chain) : new BehaviorInvoker(factory, chain);
 }