/// <summary>
 ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to
 ///     the same compatibility standards as public APIs. It may be changed or removed without notice in
 ///     any release. You should only use it directly in your code with extreme caution and knowing that
 ///     doing so can result in application failures when updating to a new Entity Framework Core release.
 /// </summary>
 public FileContextValueGeneratorSelector(
     [NotNull] ValueGeneratorSelectorDependencies dependencies,
     [NotNull] IFileContextDatabase inMemoryDatabase)
     : base(dependencies)
 {
     _inMemoryStore = inMemoryDatabase.Store;
 }
Ejemplo n.º 2
0
 public FirebirdSqlValueGeneratorSelector(
     [NotNull] ValueGeneratorSelectorDependencies dependencies,
     [NotNull] IFirebirdSqlOptions options)
     : base(dependencies)
 {
     _options = options;
 }
Ejemplo n.º 3
0
 /// <summary>
 ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
 ///     directly from your code. This API may change or be removed in future releases.
 /// </summary>
 public InMemoryValueGeneratorSelector(
     [NotNull] ValueGeneratorSelectorDependencies dependencies,
     [NotNull] IInMemoryDatabase inMemoryDatabase)
     : base(dependencies)
 {
     _inMemoryStore = inMemoryDatabase.Store;
 }
 public OracleValueGeneratorSelector(
     [NotNull] ValueGeneratorSelectorDependencies dependencies,
     [NotNull] IOracleOptions options)
     : base(dependencies)
 {
     _options = options;
 }
Ejemplo n.º 5
0
 public NpgsqlValueGeneratorSelector(
     [NotNull] ValueGeneratorSelectorDependencies dependencies,
     [NotNull] INpgsqlSequenceValueGeneratorFactory sequenceFactory,
     [NotNull] INpgsqlRelationalConnection connection)
     : base(dependencies)
 {
     _sequenceFactory = sequenceFactory;
     _connection      = connection;
 }
        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;
        }
Ejemplo n.º 7
0
        /// <summary>
        ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
        ///     directly from your code. This API may change or be removed in future releases.
        /// </summary>
        public JetValueGeneratorSelector(
            [NotNull] ValueGeneratorSelectorDependencies dependencies,
            [NotNull] IJetSequenceValueGeneratorFactory sequenceFactory,
            [NotNull] IJetRelationalConnection relationalConnection)
            : base(dependencies)
        {
            Check.NotNull(sequenceFactory, nameof(sequenceFactory));
            Check.NotNull(relationalConnection, nameof(relationalConnection));

            _sequenceFactory      = sequenceFactory;
            _relationalConnection = relationalConnection;
        }
Ejemplo n.º 8
0
 /// <summary>
 ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to
 ///     the same compatibility standards as public APIs. It may be changed or removed without notice in
 ///     any release. You should only use it directly in your code with extreme caution and knowing that
 ///     doing so can result in application failures when updating to a new Entity Framework Core release.
 /// </summary>
 public AseValueGeneratorSelector(
     ValueGeneratorSelectorDependencies dependencies,
     IAseSequenceValueGeneratorFactory sequenceFactory,
     IAseConnection connection,
     IRawSqlCommandBuilder rawSqlCommandBuilder,
     IDiagnosticsLogger <DbLoggerCategory.Database.Command> commandLogger)
     : base(dependencies)
 {
     _sequenceFactory      = sequenceFactory;
     _connection           = connection;
     _rawSqlCommandBuilder = rawSqlCommandBuilder;
     _commandLogger        = commandLogger;
 }
 /// <summary>
 ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to
 ///     the same compatibility standards as public APIs. It may be changed or removed without notice in
 ///     any release. You should only use it directly in your code with extreme caution and knowing that
 ///     doing so can result in application failures when updating to a new Entity Framework Core release.
 /// </summary>
 public SqlServerValueGeneratorSelector(
     ValueGeneratorSelectorDependencies dependencies,
     ISqlServerSequenceValueGeneratorFactory sequenceFactory,
     ISqlServerConnection connection,
     IRawSqlCommandBuilder rawSqlCommandBuilder,
     IRelationalCommandDiagnosticsLogger commandLogger)
     : base(dependencies)
 {
     _sequenceFactory      = sequenceFactory;
     _connection           = connection;
     _rawSqlCommandBuilder = rawSqlCommandBuilder;
     _commandLogger        = commandLogger;
 }
Ejemplo n.º 10
0
 public SqlServerValueGeneratorSelector(
     [NotNull] ValueGeneratorSelectorDependencies dependencies,
     [NotNull] ISqlServerSequenceValueGeneratorFactory sequenceFactory,
     [NotNull] ISqlServerConnection connection,
     [NotNull] IRawSqlCommandBuilder rawSqlCommandBuilder,
     [NotNull] IDiagnosticsLogger <DbLoggerCategory.Database.Command> commandLogger)
     : base(dependencies)
 {
     _sequenceFactory      = sequenceFactory;
     _connection           = connection;
     _rawSqlCommandBuilder = rawSqlCommandBuilder;
     _commandLogger        = commandLogger;
 }
Ejemplo n.º 11
0
        /// <summary>
        ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
        ///     directly from your code. This API may change or be removed in future releases.
        /// </summary>
        public SqlServerValueGeneratorSelector(
            [NotNull] ValueGeneratorSelectorDependencies dependencies,
            [NotNull] ISqlServerSequenceValueGeneratorFactory sequenceFactory,
            [NotNull] ISqlServerConnection connection,
            [NotNull] IRawSqlCommandBuilder rawSqlCommandBuilder)
            : base(dependencies)
        {
            Check.NotNull(sequenceFactory, nameof(sequenceFactory));
            Check.NotNull(connection, nameof(connection));
            Check.NotNull(rawSqlCommandBuilder, nameof(rawSqlCommandBuilder));

            _sequenceFactory      = sequenceFactory;
            _connection           = connection;
            _rawSqlCommandBuilder = rawSqlCommandBuilder;
        }
        public void X()
        {
            var        model      = new Model();
            EntityType entityType = model.AddEntityType(typeof(SimpleRecord));
            Property   property   = entityType.AddProperty(typeof(SimpleRecord)
                                                           .GetTypeInfo()
                                                           .GetProperty(nameof(SimpleRecord.Id)));

            var            valueGeneratorCacheDependencies    = new ValueGeneratorCacheDependencies();
            var            valueGeneratorCache                = new ValueGeneratorCache(valueGeneratorCacheDependencies);
            var            valueGeneratorSelectorDependencies = new ValueGeneratorSelectorDependencies(valueGeneratorCache);
            var            mongoDbValueGeneratorSelector      = new MongoDbValueGeneratorSelector(valueGeneratorSelectorDependencies);
            ValueGenerator valueGenerator = mongoDbValueGeneratorSelector.Select(property, entityType);

            Assert.IsAssignableFrom(typeof(ObjectIdValueGenerator), valueGenerator);
        }
Ejemplo n.º 13
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);
            }
        }
 public CosmosValueGeneratorSelector(ValueGeneratorSelectorDependencies dependencies)
     : base(dependencies)
 {
 }
Ejemplo n.º 15
0
 /// <summary>
 ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to
 ///     the same compatibility standards as public APIs. It may be changed or removed without notice in
 ///     any release. You should only use it directly in your code with extreme caution and knowing that
 ///     doing so can result in application failures when updating to a new Entity Framework Core release.
 /// </summary>
 public MySQLValueGeneratorSelector(
     [NotNull] ValueGeneratorSelectorDependencies dependencies)
     : base(dependencies)
 {
 }
Ejemplo n.º 16
0
 public CustomInMemoryValueGeneratorSelector(ValueGeneratorSelectorDependencies dependencies)
     : base(dependencies)
 {
 }
Ejemplo n.º 17
0
 public LocalValueGeneratorSelector(ValueGeneratorSelectorDependencies dependencies) : base(dependencies)
 {
 }
Ejemplo n.º 18
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="RelationalValueGeneratorSelector" /> class.
 /// </summary>
 /// <param name="dependencies"> Parameter object containing dependencies for this service. </param>
 public CustomRelationalValueGeneratorSelector(ValueGeneratorSelectorDependencies dependencies)
     : base(dependencies)
 {
 }
Ejemplo n.º 19
0
 public InfoCarrierValueGeneratorSelector(ValueGeneratorSelectorDependencies dependencies)
     : base(dependencies)
 {
 }
Ejemplo n.º 20
0
 public CustomInMemoryValueGeneratorSelector(
     ValueGeneratorSelectorDependencies dependencies,
     IInMemoryDatabase inMemoryDatabase)
     : base(dependencies, inMemoryDatabase)
 {
 }
Ejemplo n.º 21
0
 /// <inheritdoc />
 /// <summary>
 /// Initializes a new instance of the <see cref="T:Blueshift.EntityFrameworkCore.MongoDB.ValueGeneration.MongoDbValueGeneratorSelector" /> class.
 /// </summary>
 /// <param name="dependencies">Parameter object containing dependencies for this service.</param>
 public MongoValueGeneratorSelector(ValueGeneratorSelectorDependencies dependencies)
     : base(dependencies)
 {
 }
Ejemplo n.º 22
0
 /// <summary>
 ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
 ///     directly from your code. This API may change or be removed in future releases.
 /// </summary>
 public FileContextValueGeneratorSelector([NotNull] ValueGeneratorSelectorDependencies dependencies, IFileContextStoreCache _storeCache, FileContextIntegerValueGeneratorCache _idCache, IDbContextOptions contextOptions)
     : base(dependencies)
 {
     _fileContextFactory = new FileContextIntegerValueGeneratorFactory(_storeCache, _idCache, contextOptions);
 }
 /// <summary>
 ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
 ///     directly from your code. This API may change or be removed in future releases.
 /// </summary>
 public HarmonyValueGeneratorSelector(ValueGeneratorSelectorDependencies dependencies)
     : base(dependencies)
 {
 }
Ejemplo n.º 24
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="ValueGeneratorSelector" /> class.
 /// </summary>
 /// <param name="dependencies">Parameter object containing dependencies for this service.</param>
 public ValueGeneratorSelector(ValueGeneratorSelectorDependencies dependencies)
 {
     Dependencies = dependencies;
 }
Ejemplo n.º 25
0
 public FbValueGeneratorSelector(ValueGeneratorSelectorDependencies dependencies, IFbOptions options)
     : base(dependencies)
 {
     _options = options;
 }
Ejemplo n.º 26
0
 /// <summary>
 ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
 ///     directly from your code. This API may change or be removed in future releases.
 /// </summary>
 public FileContextValueGeneratorSelector([NotNull] ValueGeneratorSelectorDependencies dependencies, IFileContextStoreCache _storeCache)
     : base(dependencies)
 {
     _fileContextFactory = new FileContextIntegerValueGeneratorFactory(_storeCache);
 }
 public RocksDbValueGeneratorSelector(ValueGeneratorSelectorDependencies dependencies)
     : base(dependencies)
 {
 }
 /// <summary>
 ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
 ///     directly from your code. This API may change or be removed in future releases.
 /// </summary>
 public InMemoryValueGeneratorSelector([NotNull] ValueGeneratorSelectorDependencies dependencies)
     : base(dependencies)
 {
 }