コード例 #1
0
 internal JsonRpcServer(
     IOptions<JsonRpcServerOptions> options,
     Connection connection,
     IHandlersManager handlerCollection,
     IResponseRouter responseRouter,
     IServiceProvider serviceProvider,
     InstanceHasStarted instanceHasStarted
 ) : base(handlerCollection, responseRouter)
 {
     _connection = connection;
     _serviceProvider = serviceProvider;
     _instanceHasStarted = instanceHasStarted;
     _disposable = options.Value.CompositeDisposable;
     _disposable.Add(_connection);
     if (serviceProvider is IDisposable disposable)
     {
         _disposable.Add(disposable);
     }
 }