Beispiel #1
0
        public GenericsDataPool(ILogger <GenericsDataPool <T> > logger, IOptions <DataPoolOption> option, GenericsDataPoolOption <T> genericsOption, IDPoolKeyGenerator dPoolKeyGenerator)
        {
            _logger            = logger;
            _option            = option.Value;
            _genericsOption    = genericsOption;
            _dPoolKeyGenerator = dPoolKeyGenerator;

            Identifier = BuildIdentifier(_genericsOption);

            _cts = new CancellationTokenSource();

            _idSelector  = (Func <T, string>)_genericsOption.IdSelector;
            _processDict = new ConcurrentDictionary <string, DataFuture <T> >();
        }
Beispiel #2
0
 public DPoolKeyGenerator(IOptions <DataPoolOption> option)
 {
     _option = option.Value;
 }