コード例 #1
0
        public MsSqlStorageProvider(JobbrMsSqlConfiguration configuration)
        {
            this.connectionFactory = new OrmLiteConnectionFactory(configuration.ConnectionString, configuration.DialectProvider);

            if (configuration.CreateTablesIfNotExists)
            {
                this.CreateTables();
            }
        }
コード例 #2
0
        public static void AddMsSqlStorage(this IJobbrBuilder builder, Action <JobbrMsSqlConfiguration> config)
        {
            var msSqlConfiguration = new JobbrMsSqlConfiguration();

            config(msSqlConfiguration);

            builder.Add <JobbrMsSqlConfiguration>(msSqlConfiguration);

            builder.Register <IJobStorageProvider>(typeof(MsSqlStorageProvider));
            builder.Register <IConfigurationValidator>(typeof(JobbrMsSqlConfigurationValidator));
        }
コード例 #3
0
        public MsSqlStorageProvider(JobbrMsSqlConfiguration configuration)
        {
            this.connectionFactory = new OrmLiteConnectionFactory(configuration.ConnectionString, configuration.DialectProvider);

            if (configuration.CreateTablesIfNotExists)
            {
                this.CreateTables();
            }

            if (configuration.Retention.HasValue)
            {
                this.retentionEnforcer = new RetentionEnforcer(this, configuration.Retention.Value, configuration.RetentionEnforcementInterval);
            }
        }