Exemplo n.º 1
0
 public TestDatabaseCreator(string databaseName, IDatabaseDropper databaseDropper, ISqlCommandExecutor sqlCommandExecutor)
 {
     if (databaseName == null) throw new ArgumentNullException(nameof(databaseName));
     if (databaseDropper == null) throw new ArgumentNullException(nameof(databaseDropper));
     if (sqlCommandExecutor == null) throw new ArgumentNullException(nameof(sqlCommandExecutor));
     _databaseName = databaseName;
     _databaseDropper = databaseDropper;
     _sqlCommandExecutor = sqlCommandExecutor;
 }
Exemplo n.º 2
0
 public RepositoryQuery(ISqlSyntaxSign sqlsyntaxsign,
                        IMapper <T, U> mapper,
                        ISqlCommandBuilder sqlcommandbuilder,
                        ISqlCommandExecutor <T> sqlcommandexecutor, ISqlCommandExecutorBulk sqlcommandexecutorbulk)
     : this(sqlcommandexecutor, sqlcommandexecutorbulk,
            mapper,
            sqlcommandbuilder,
            new SqlBuilderQuery(sqlsyntaxsign))
 {
 }
Exemplo n.º 3
0
 public RepositoryQuery(ISqlCommandExecutor <T> sqlcommandexecutor, ISqlCommandExecutorBulk sqlcommandexecutorbulk,
                        IMapper <T, U> mapper,
                        ISqlCommandBuilder sqlcommandbuilder,
                        ISqlBuilderQuery sqlbuilder)
     : base(sqlcommandexecutor, sqlcommandexecutorbulk,
            mapper)
 {
     _sqlcommandbuilder = sqlcommandbuilder;
     _sqlbuilder        = sqlbuilder;
 }
Exemplo n.º 4
0
        public SqlServerQueueProvider(SqlServerQueueProviderOptions opt, IQueueConfigProvider names, ISqlServerQueueProviderMigrator migrator, ISqlCommandExecutor sqlCommandExecutor)
        {
            _config             = names;
            _migrator           = migrator;
            _sqlCommandExecutor = sqlCommandExecutor;
            _connectionString   = opt.ConnectionString;
            _canMigrateDb       = opt.CanMigrateDb;
            _canCreateDb        = opt.CanCreateDb;

            IsDequeueBlocking = true;

            _queueWorkCommand   = GetFromResource("QueueWork");
            _dequeueWorkCommand = GetFromResource("DequeueWork");
        }
 public SqlServerQueueProviderMigrator(string connectionString, IQueueConfigProvider configProvider, ISqlCommandExecutor sqlCommandExecutor)
 {
     _connectionString   = connectionString;
     _configProvider     = configProvider;
     _sqlCommandExecutor = sqlCommandExecutor;
 }
Exemplo n.º 6
0
 public DatabaseDropper(ISqlCommandExecutor executor)
 {
     if (executor == null) throw new ArgumentNullException(nameof(executor));
     _executor = executor;
 }
Exemplo n.º 7
0
 /// <summary>
 /// Initializes a new <see cref="SqlStandardCallContext"/> that may be bound to an existing monitor
 /// or to a command executor.
 /// <para>
 /// If a <paramref name="executor"/> is provided, the protected <see cref="OnCommandExecuting"/>,
 /// <see cref="OnCommandExecuted"/> and <see cref="OnCommandError"/> are no more called: it is up to
 /// the external executor to fully handle command execution.
 /// </para>
 /// </summary>
 /// <param name="monitor">
 /// Optional monitor to use. When null, a new <see cref="ActivityMonitor"/> will be created
 /// when <see cref="Monitor"/> property is accessed.
 /// </param>
 /// <param name="executor">
 /// Optional command executor to which all command execution will be forwarded.
 /// </param>
 public SqlStandardCallContext(IActivityMonitor monitor = null, ISqlCommandExecutor executor = null)
 {
     _ownedMonitor = monitor == null;
     _monitor      = monitor;
     _executor     = executor ?? this;
 }
Exemplo n.º 8
0
 public RepositoryMapper(ISqlCommandExecutor <T> sqlrepository, ISqlCommandExecutorBulk sqlrepositorybulk,
                         IMapper <T, U> mapper)
     : base(sqlrepository, sqlrepositorybulk)
 {
     _mapper = mapper;
 }
Exemplo n.º 9
0
 public Repository(ISqlCommandExecutor <T> sqlcommandexecutor, ISqlCommandExecutorBulk sqlcommandexecutorbulk)
 {
     _sqlcommandexecutor     = sqlcommandexecutor;
     _sqlcommandexecutorbulk = sqlcommandexecutorbulk;
 }
Exemplo n.º 10
0
 /// <summary>
 /// Initializes a new <see cref="SqlTransactionCallContext"/> that may be bound to an existing monitor
 /// or to a command executor.
 /// <para>
 /// If a <paramref name="executor"/> is provided, the protected <see cref="SqlStandardCallContext.OnCommandExecuting"/>,
 /// <see cref="SqlStandardCallContext.OnCommandExecuted"/> and <see cref="SqlStandardCallContext.OnCommandError"/> are no
 /// more called: it is up to the external executor to fully handle command execution.
 /// </para>
 /// </summary>
 /// <param name="monitor">
 /// Optional monitor to use. When null, a new <see cref="ActivityMonitor"/> will be created
 /// when <see cref="SqlStandardCallContext.Monitor">Monitor</see> property is accessed.
 /// </param>
 /// <param name="executor">
 /// Optional command executor to which all command execution will be forwarded.
 /// </param>
 public SqlTransactionCallContext(IActivityMonitor monitor = null, ISqlCommandExecutor executor = null)
     : base(monitor, executor)
 {
 }
Exemplo n.º 11
0
 public Repository(ISqlCommandExecutor sqlCommandExecutor)
 {
     _sqlCommandExecutor = sqlCommandExecutor;
 }