private void AddEndpoint <TRequest, TResponse>(IRpcServiceResolver rpcServiceResolver) where TRequest : class, new() where TResponse : class, new() { Post[typeof(TRequest).Name, true] = async(ctx, ct) => { IRpcService <TRequest, TResponse> rpcService = rpcServiceResolver.GetRpcService <TRequest, TResponse>(); var request = this.Bind <TRequest>(); return(await rpcService.Execute(request, ct)); }; }