public OracleValueGeneratorSelector(
            [NotNull] ValueGeneratorSelectorDependencies dependencies,
            [NotNull] IOracleSequenceValueGeneratorFactory sequenceFactory,
            [NotNull] IOracleConnection connection)
            : base(dependencies)
        {
            Check.NotNull(sequenceFactory, nameof(sequenceFactory));
            Check.NotNull(connection, nameof(connection));

            _sequenceFactory = sequenceFactory;
            _connection      = connection;
        }
Esempio n. 2
0
        /// <summary>
        /// 实例化值生成器选择器
        /// </summary>
        /// <param name="dependencies">值生成器选择器依赖</param>
        /// <param name="sequenceFactory">序列值生成器工厂</param>
        /// <param name="connection">连接对象</param>
        /// <param name="logger">日志</param>
        public OracleValueGeneratorSelector(
            [NotNull] ValueGeneratorSelectorDependencies dependencies,
            [NotNull] IOracleSequenceValueGeneratorFactory sequenceFactory,
            [NotNull] IOracleConnection connection,
            IDiagnosticsLogger <DbLoggerCategory.Update> logger = null)
            : base(dependencies)
        {
            if (Check.IsTraceEnabled(logger?.Logger))
            {
                Trace <DbLoggerCategory.Update> .Write(logger, LogLevel.Trace, OracleTraceTag.Entry, OracleTraceClassName.OracleValueGeneratorSelector, OracleTraceFuncName.ctor);
            }

            Check.NotNull(sequenceFactory, nameof(sequenceFactory));
            Check.NotNull(connection, nameof(connection));
            _sequenceFactory = sequenceFactory;
            _connection      = connection;
            m_oracleLogger   = logger;

            if (Check.IsTraceEnabled(logger?.Logger))
            {
                Trace <DbLoggerCategory.Update> .Write(logger, LogLevel.Trace, OracleTraceTag.Exit, OracleTraceClassName.OracleValueGeneratorSelector, OracleTraceFuncName.ctor);
            }
        }