Ejemplo n.º 1
0
        public OracleStorage(IOptions <OracleStorageOptions> options, OracleConnectionFactory connectionFactory, ILogger <OracleStorage> logger)
        {
            _options          = options.Value;
            ConnectionFactory = connectionFactory;
            Logger            = logger;

            if (_options.EnableDefer)
            {
                _deferFlushCollection = new AsyncCallbackDeferFlushCollection <IRequestInfo, IRequestDetail>(AddRequestInfoAsync, _options.DeferThreshold, _options.DeferSecond);
            }
        }
Ejemplo n.º 2
0
        public OracleStorage(IOptions <OracleStorageOptions> options, OracleConnectionFactory connectionFactory, ILogger <OracleStorage> logger)
        {
            _options = options.Value;
            if (!_options.TablePrefix.IsEmpty())
            {
                TablePrefix = _options.TablePrefix + ".";
            }
            ConnectionFactory = connectionFactory;
            Logger            = logger;

            if (_options.EnableDefer)
            {
                _deferFlushCollection = new AsyncCallbackDeferFlushCollection <RequestBag>(AddRequestInfoAsync, _options.DeferThreshold, _options.DeferSecond);
            }
        }