Beispiel #1
0
 public DataManager(string channelId,
                    IMemoryCache cache,
                    IBlockDatabaseSettings blockSetting,
                    IHistoryDatabaseSettings historySetting,
                    IStatusDatabaseSettings statusSetting)
 {
     _cache           = cache;
     _channelId       = channelId;
     _blockDatabase   = new MongoClient(blockSetting.ConnectionString).GetDatabase(blockSetting.DatabaseName + "_" + _channelId);
     _statusDatabase  = new MongoClient(statusSetting.ConnectionString).GetDatabase(statusSetting.DatabaseName + "_" + _channelId);
     _historyDatabase = new MongoClient(historySetting.ConnectionString).GetDatabase(historySetting.DatabaseName + "_" + _channelId);
 }
Beispiel #2
0
 public NodePeer(
     ILoggerFactory loggerFactory,
     IMemoryCache memoryCache,
     IBlockDatabaseSettings blockSetting,
     IHistoryDatabaseSettings historySetting,
     IStatusDatabaseSettings statusSetting,
     IAssemblyProvider assemblyProvider,
     IIdentityProvider identityProvider,
     MQSetting mq,
     IHttpClientFactory httpClientFactory
     )
 {
     _clientFactory           = httpClientFactory;
     _mq                      = mq;
     _identityProvider        = identityProvider;
     _assemblyProvider        = assemblyProvider;
     _blockDatabaseSetting    = blockSetting;
     _historyDatabaseSettings = historySetting;
     _statusDatabaseSettings  = statusSetting;
     _memoryCache             = memoryCache;
     _loggerFactory           = loggerFactory;
     _logger                  = loggerFactory.CreateLogger <NodePeer>();
 }