public static Middleware GetMethodDispatcher(Func <Type[], IMethodDispatcher> getProxy) { return(async(ctx, next) => { Request request = CheckRequest(ctx); if (request.TypeArguments.Any()) { IMethodDispatcher proxy = getProxy(request.TypeArguments.ToArray()); await proxy.Dispatch(ctx, next); } else { await next(); } }); }
public ContractInterceptor(IMethodDispatcher methodDispatcher) { _methodDispatcher = methodDispatcher; }
public ContractProxyGenerator(IProxyGenerator proxyGenerator, IMethodDispatcher methodDispatcher) { _proxyGenerator = proxyGenerator; _methodDispatcher = methodDispatcher; }