Inheritance: JobStorage
コード例 #1
0
        public ExpirationManager(SQLiteStorage storage, TimeSpan checkInterval)
        {
            if (storage == null) throw new ArgumentNullException("storage");

            _storage = storage;
            _checkInterval = checkInterval;
        }
コード例 #2
0
        public SQLiteFetchedJob(
            [NotNull] SQLiteStorage storage,
            int id,
            string jobId,
            string queue)
        {
            if (storage == null)
            {
                throw new ArgumentNullException(nameof(storage));
            }
            if (jobId == null)
            {
                throw new ArgumentNullException(nameof(jobId));
            }
            if (queue == null)
            {
                throw new ArgumentNullException(nameof(queue));
            }

            _storage = storage;

            Id    = id;
            JobId = jobId;
            Queue = queue;
        }
コード例 #3
0
 public SQLiteJobQueueMonitoringApi([NotNull] SQLiteStorage storage)
 {
     if (storage == null)
     {
         throw new ArgumentNullException("storage");
     }
     _storage = storage;
 }
コード例 #4
0
 public SQLiteStorageConnection([NotNull] SQLiteStorage storage)
 {
     if (storage == null)
     {
         throw new ArgumentNullException("storage");
     }
     _storage = storage;
 }
コード例 #5
0
        public SQLiteJobQueue([NotNull] SQLiteStorage storage, SQLiteStorageOptions options)
        {
            if (storage == null) throw new ArgumentNullException("storage");
            if (options == null) throw new ArgumentNullException("options");

            _storage = storage;
            _options = options;
        }
コード例 #6
0
        public SQLiteWriteOnlyTransaction([NotNull] SQLiteStorage storage)
        {
            if (storage == null)
            {
                throw new ArgumentNullException("storage");
            }

            _storage = storage;
        }
コード例 #7
0
ファイル: Program.cs プロジェクト: AGRocks/HangfireExtension
 static void Main(string[] args)
 {
     var storage = new SQLiteStorage(@"Data Source=c:\mydb.db;Version=3;");
     using (new BackgroundJobServer())
     {
         Console.WriteLine("Hangfire Server started. Press ENTER to exit...");
         Console.ReadLine();
     }
 }
コード例 #8
0
        public SQLiteMonitoringApi([NotNull] SQLiteStorage storage, int?jobListLimit)
        {
            if (storage == null)
            {
                throw new ArgumentNullException("storage");
            }

            _storage      = storage;
            _jobListLimit = jobListLimit;
        }
コード例 #9
0
        public static IGlobalConfiguration<SQLiteStorage> UseSQLiteStorage(
            [NotNull] this IGlobalConfiguration configuration,
            [NotNull] string nameOrConnectionString)
        {
            if (configuration == null) throw new ArgumentNullException("configuration");
            if (nameOrConnectionString == null) throw new ArgumentNullException("nameOrConnectionString");

            var storage = new SQLiteStorage(nameOrConnectionString);
            return configuration.UseStorage(storage);
        }
コード例 #10
0
        public ExpirationManager(SQLiteStorage storage, TimeSpan checkInterval)
        {
            if (storage == null)
            {
                throw new ArgumentNullException("storage");
            }

            _storage       = storage;
            _checkInterval = checkInterval;
        }
コード例 #11
0
        public SQLiteJobQueue([NotNull] SQLiteStorage storage, SQLiteStorageOptions options)
        {
            if (storage == null)
            {
                throw new ArgumentNullException("storage");
            }
            if (options == null)
            {
                throw new ArgumentNullException("options");
            }

            _storage = storage;
            _options = options;
        }
コード例 #12
0
        public SQLiteJobQueueProvider([NotNull] SQLiteStorage storage, [NotNull] SQLiteStorageOptions options)
        {
            if (storage == null)
            {
                throw new ArgumentNullException("storage");
            }
            if (options == null)
            {
                throw new ArgumentNullException("options");
            }

            _jobQueue      = new SQLiteJobQueue(storage, options);
            _monitoringApi = new SQLiteJobQueueMonitoringApi(storage);
        }
コード例 #13
0
        public SQLiteFetchedJob(
            [NotNull] SQLiteStorage storage,
            int id,           
            string jobId,
            string queue)
        {
            if (storage == null) throw new ArgumentNullException("storage");
            if (jobId == null) throw new ArgumentNullException("jobId");
            if (queue == null) throw new ArgumentNullException("queue");

            _storage = storage;

            Id = id;
            JobId = jobId;
            Queue = queue;
        }
コード例 #14
0
        public static IGlobalConfiguration <SQLiteStorage> UseSQLiteStorage(
            [NotNull] this IGlobalConfiguration configuration,
            [NotNull] string nameOrConnectionString)
        {
            if (configuration == null)
            {
                throw new ArgumentNullException("configuration");
            }
            if (nameOrConnectionString == null)
            {
                throw new ArgumentNullException("nameOrConnectionString");
            }

            var storage = new SQLiteStorage(nameOrConnectionString);

            return(configuration.UseStorage(storage));
        }
コード例 #15
0
 public ExpirationManager(SQLiteStorage storage)
     : this(storage, TimeSpan.FromHours(1))
 {
 }
コード例 #16
0
 public ExpirationManager(SQLiteStorage storage)
     : this(storage, TimeSpan.FromHours(1))
 {
 }
コード例 #17
0
 public SQLiteStorageConnection([NotNull] SQLiteStorage storage)
 {
     if (storage == null) throw new ArgumentNullException("storage");
     _storage = storage;
 }