public static IServiceCollection AddJsonRpcHandler(this IServiceCollection services, string method, IJsonRpcHandler handler, JsonRpcHandlerOptions options = null)
 {
     services.AddSingleton(JsonRpcHandlerDescription.Named(method, handler, options));
     return(services);
 }
예제 #2
0
 public sealed override T AddHandler(string method, Type type, JsonRpcHandlerOptions?options = null)
 {
     Handlers.Add(JsonRpcHandlerDescription.Named(method, type, options));
     return((T)(object)this);
 }
 public static IServiceCollection AddJsonRpcHandler(this IServiceCollection services, JsonRpcHandlerFactory handlerFunc, JsonRpcHandlerOptions options = null)
 {
     services.AddSingleton(JsonRpcHandlerDescription.Named(null, handlerFunc, options));
     return(services);
 }
 public sealed override T AddHandler(JsonRpcHandlerFactory handlerFunc, JsonRpcHandlerOptions options = null)
 {
     Handlers.Add(JsonRpcHandlerDescription.Named(null, handlerFunc, options));
     return((T)(object)this);
 }