Пример #1
0
            public async ValueTask <IBlockExchanger> CreateAsync(string configPath, BlockExchangerOptions options,
                                                                 IObjectStoreFactory objectStoreFactory, IConnectionController connectionController,
                                                                 INodeExplorer nodeExplorer, IPublishStorage publishStorage, IWantStorage wantStorage, IBytesPool bytesPool)
            {
                var result = new BlockExchanger(configPath, options, objectStoreFactory, connectionController, nodeExplorer, publishStorage, wantStorage, bytesPool);
                await result.InitAsync();

                return(result);
            }
Пример #2
0
 internal BlockExchanger(string configPath, BlockExchangerOptions options,
                         IObjectStoreFactory objectStoreFactory, IConnectionController connectionController,
                         INodeExplorer nodeExplorer, IPublishStorage publishStorage, IWantStorage wantStorage, IBytesPool bytesPool)
 {
     _configPath           = configPath;
     _options              = options;
     _objectStoreFactory   = objectStoreFactory;
     _connectionController = connectionController;
     _nodeExplorer         = nodeExplorer;
     _publishStorage       = publishStorage;
     _wantStorage          = wantStorage;
     _bytesPool            = bytesPool;
 }