/// <summary>Initializes a new instance of the <see cref="LiteDbMessageQueueCreation"/> class.</summary> /// <param name="connectionInfo">The connection information.</param> /// <param name="queryTableExists">The query table exists.</param> /// <param name="options">The options.</param> /// <param name="createSchema">The create schema.</param> /// <param name="createCommand">The create command.</param> /// <param name="deleteCommand">The delete command.</param> /// <param name="creationScope">The creation scope.</param> /// <param name="connectionManager">DB Connection manager</param> public LiteDbMessageQueueCreation(IConnectionInformation connectionInfo, IQueryHandler <GetTableExistsQuery, bool> queryTableExists, ILiteDbMessageQueueTransportOptionsFactory options, LiteDbMessageQueueSchema createSchema, ICommandHandlerWithOutput <CreateQueueTablesAndSaveConfigurationCommand <ITable>, QueueCreationResult> createCommand, ICommandHandlerWithOutput <DeleteQueueTablesCommand, QueueRemoveResult> deleteCommand, ICreationScope creationScope, LiteDbConnectionManager connectionManager ) { Guard.NotNull(() => options, options); Guard.NotNull(() => createSchema, createSchema); Guard.NotNull(() => queryTableExists, queryTableExists); Guard.NotNull(() => createCommand, createCommand); Guard.NotNull(() => deleteCommand, deleteCommand); Guard.NotNull(() => creationScope, creationScope); Guard.NotNull(() => connectionManager, connectionManager); _options = new Lazy <LiteDbMessageQueueTransportOptions>(options.Create); _createSchema = createSchema; _queryTableExists = queryTableExists; _createCommand = createCommand; _deleteCommand = deleteCommand; ConnectionInfo = connectionInfo; Scope = creationScope; _connectionManager = connectionManager; }
/// <summary> /// Initializes a new instance of the <see cref="LiteDbSendJobToQueue"/> class. /// </summary> /// <param name="connectionInformation">The connection information.</param> /// <param name="queue">The queue.</param> /// <param name="doesJobExist">The does job exist.</param> /// <param name="removeMessage">The remove message.</param> /// <param name="getJobId">The get job identifier.</param> /// <param name="createJobMetaData">The create job meta data.</param> /// <param name="getTimeFactory">The get time factory.</param> public LiteDbSendJobToQueue(LiteDbConnectionManager connectionInformation, IProducerMethodQueue queue, IQueryHandler <DoesJobExistQuery, QueueStatuses> doesJobExist, IRemoveMessage removeMessage, IQueryHandler <GetJobIdQuery <int>, int> getJobId, CreateJobMetaData createJobMetaData, IGetTimeFactory getTimeFactory) : base(queue, getTimeFactory) { _doesJobExist = doesJobExist; _removeMessage = removeMessage; _getJobId = getJobId; _createJobMetaData = createJobMetaData; _connectionInformation = connectionInformation; }
/// <summary> /// Initializes a new instance of the <see cref="JobTableCreation" /> class. /// </summary> /// <param name="queryTableExists">The query table exists.</param> /// <param name="createSchema">The create schema.</param> /// <param name="createCommand">The create command.</param> /// <param name="connectionInfo">The connection information.</param> /// <param name="tableNameHelper">The table name helper.</param> public LiteDbJobTableCreation(IQueryHandler <GetTableExistsQuery, bool> queryTableExists, IJobSchema createSchema, ICommandHandlerWithOutput <CreateJobTablesCommand <ITable>, QueueCreationResult> createCommand, LiteDbConnectionManager connectionInfo, TableNameHelper tableNameHelper ) { Guard.NotNull(() => createSchema, createSchema); Guard.NotNull(() => queryTableExists, queryTableExists); Guard.NotNull(() => createCommand, createCommand); Guard.NotNull(() => connectionInfo, connectionInfo); Guard.NotNull(() => tableNameHelper, tableNameHelper); _createSchema = createSchema; _queryTableExists = queryTableExists; _createCommand = createCommand; _connection = connectionInfo; _tableNameHelper = tableNameHelper; }