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()); }
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(); }
public static IBehaviorInvoker DetermineInvoker(IServiceFactory factory, BehaviorChain chain) { return(chain.IsAsynchronous() ? new AsyncBehaviorInvoker(factory, chain) : new BehaviorInvoker(factory, chain)); }
public static IBehaviorInvoker DetermineInvoker(IBehaviorFactory factory, BehaviorChain chain) { return chain.IsAsynchronous() ? new AsyncBehaviorInvoker(factory, chain) : new BehaviorInvoker(factory, chain); }