/// <summary> /// Initializes a new instance of the <see cref="ReceiveMessageQueryHandler" /> class. /// </summary> /// <param name="optionsFactory">The options factory.</param> /// <param name="tableNameHelper">The table name helper.</param> /// <param name="commandCache">The command cache.</param> /// <param name="connectionInformation">The connection information.</param> /// <param name="buildDequeueCommand">The build dequeue command.</param> /// <param name="messageDeQueue">The message de queue.</param> /// <param name="dbFactory">The transaction factory.</param> /// <param name="databaseExists">The database exists.</param> /// <param name="readerAsync">The reader asynchronous.</param> public ReceiveMessageQueryHandlerAsync(ISqLiteMessageQueueTransportOptionsFactory optionsFactory, TableNameHelper tableNameHelper, IDbCommandStringCache commandCache, IConnectionInformation connectionInformation, BuildDequeueCommand buildDequeueCommand, MessageDeQueue messageDeQueue, IDbFactory dbFactory, DatabaseExists databaseExists, IReaderAsync readerAsync) { Guard.NotNull(() => optionsFactory, optionsFactory); Guard.NotNull(() => tableNameHelper, tableNameHelper); Guard.NotNull(() => commandCache, commandCache); Guard.NotNull(() => buildDequeueCommand, buildDequeueCommand); Guard.NotNull(() => messageDeQueue, messageDeQueue); Guard.NotNull(() => databaseExists, databaseExists); Guard.NotNull(() => readerAsync, readerAsync); _options = new Lazy <SqLiteMessageQueueTransportOptions>(optionsFactory.Create); _tableNameHelper = tableNameHelper; _commandCache = commandCache; _connectionInformation = connectionInformation; _buildDequeueCommand = buildDequeueCommand; _messageDeQueue = messageDeQueue; _dbFactory = dbFactory; _databaseExists = databaseExists; _readerAsync = readerAsync; }
/// <summary> /// Initializes a new instance of the <see cref="SendMessageCommandHandler" /> class. /// </summary> /// <param name="tableNameHelper">The table name helper.</param> /// <param name="serializer">The serializer.</param> /// <param name="optionsFactory">The options factory.</param> /// <param name="headers">The headers.</param> /// <param name="commandCache">The command cache.</param> /// <param name="configurationSend">The configuration send.</param> /// <param name="getTimeFactory">The get time factory.</param> /// <param name="dbFactory">The database factory.</param> /// <param name="sendJobStatus">The send job status.</param> /// <param name="jobExistsHandler">The job exists handler.</param> /// <param name="jobSchedulerMetaData">The job scheduler meta data.</param> /// <param name="databaseExists">The database exists.</param> /// <param name="readerAsync">The reader asynchronous.</param> public SendMessageCommandHandlerAsync(TableNameHelper tableNameHelper, ICompositeSerialization serializer, ISqLiteMessageQueueTransportOptionsFactory optionsFactory, IHeaders headers, IDbCommandStringCache commandCache, TransportConfigurationSend configurationSend, IGetTimeFactory getTimeFactory, IDbFactory dbFactory, ICommandHandler <SetJobLastKnownEventCommand <IDbConnection, IDbTransaction> > sendJobStatus, IQueryHandler <DoesJobExistQuery <IDbConnection, IDbTransaction>, QueueStatuses> jobExistsHandler, IJobSchedulerMetaData jobSchedulerMetaData, DatabaseExists databaseExists, IReaderAsync readerAsync) { Guard.NotNull(() => tableNameHelper, tableNameHelper); Guard.NotNull(() => serializer, serializer); Guard.NotNull(() => optionsFactory, optionsFactory); Guard.NotNull(() => headers, headers); Guard.NotNull(() => commandCache, commandCache); Guard.NotNull(() => configurationSend, configurationSend); Guard.NotNull(() => getTimeFactory, getTimeFactory); Guard.NotNull(() => sendJobStatus, sendJobStatus); Guard.NotNull(() => jobExistsHandler, jobExistsHandler); Guard.NotNull(() => jobSchedulerMetaData, jobSchedulerMetaData); Guard.NotNull(() => databaseExists, databaseExists); Guard.NotNull(() => readerAsync, readerAsync); _tableNameHelper = tableNameHelper; _serializer = serializer; _options = new Lazy <SqLiteMessageQueueTransportOptions>(optionsFactory.Create); _headers = headers; _commandCache = commandCache; _configurationSend = configurationSend; _getTime = getTimeFactory.Create(); _dbFactory = dbFactory; _sendJobStatus = sendJobStatus; _jobExistsHandler = jobExistsHandler; _jobSchedulerMetaData = jobSchedulerMetaData; _databaseExists = databaseExists; _readerAsync = readerAsync; }