コード例 #1
0
ファイル: ServerWatchdog.cs プロジェクト: henningst/HangFire
        public ServerWatchdog(JobStorage storage, ServerWatchdogOptions options)
        {
            if (storage == null) throw new ArgumentNullException("storage");
            if (options == null) throw new ArgumentNullException("options");

            _storage = storage;
            _options = options;
        }
コード例 #2
0
        public ServerWatchdogFacts()
        {
            _storage = new Mock<JobStorage>();
            _connection = new Mock<IStorageConnection>();
            _options = new ServerWatchdogOptions
            {
                CheckInterval = Timeout.InfiniteTimeSpan // To check that it exits by cancellation token
            };
            _token = new CancellationToken(true);

            _storage.Setup(x => x.GetConnection()).Returns(_connection.Object);
        }
コード例 #3
0
        public ServerWatchdog(JobStorage storage, ServerWatchdogOptions options)
        {
            if (storage == null)
            {
                throw new ArgumentNullException("storage");
            }
            if (options == null)
            {
                throw new ArgumentNullException("options");
            }

            _storage = storage;
            _options = options;
        }