/// <summary>
        /// Initializes a new instance of the <see cref="CommandStringCache" /> class.
        /// </summary>
        /// <param name="tableNameHelper">The table name helper.</param>
        protected CommandStringCache(TableNameHelper tableNameHelper)
        {
            Guard.NotNull(() => tableNameHelper, tableNameHelper);

            TableNameHelper      = tableNameHelper;
            CommandCache         = new Dictionary <CommandStringTypes, string>();
            _commandCacheRunTime = new ConcurrentDictionary <string, CommandString>();
        }
Example #2
0
        /// <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 JobTableCreation(IQueryHandler <GetTableExistsQuery, bool> queryTableExists,
                                IJobSchema createSchema,
                                ICommandHandlerWithOutput <CreateJobTablesCommand <ITable>, QueueCreationResult> createCommand,
                                IConnectionInformation 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;
        }