コード例 #1
0
        public static SqlServerStorage UseMsmqQueues(this SqlServerStorage storage, string pathPattern, params string[] queues)
        {
            if (storage == null) throw new ArgumentNullException("storage");

            var provider = new MsmqJobQueueProvider(pathPattern, queues);
            storage.QueueProviders.Add(provider, queues);

            return storage;
        }
コード例 #2
0
        public static SqlServerStorage UseMsmqQueues(this SqlServerStorage storage, string pathPattern, params string[] queues)
        {
            if (storage == null)
            {
                throw new ArgumentNullException("storage");
            }

            var provider = new MsmqJobQueueProvider(pathPattern, queues);

            storage.QueueProviders.Add(provider, queues);

            return(storage);
        }
コード例 #3
0
ファイル: MsmqExtensions.cs プロジェクト: djrineh/Hangfire
        public static IGlobalConfiguration<SqlServerStorage> UseMsmqQueues(
            this IGlobalConfiguration<SqlServerStorage> configuration,
            string pathPattern, params string[] queues)
        {
            if (queues.Length == 0)
            {
                queues = new[] { EnqueuedState.DefaultQueue };
            }

            var provider = new MsmqJobQueueProvider(pathPattern, queues);
            configuration.Entry.QueueProviders.Add(provider, queues);

            return configuration;
        }
コード例 #4
0
        public static SqlServerStorage UseMsmqQueues(
            [NotNull] this SqlServerStorage storage, 
            MsmqTransactionType transactionType,
            [NotNull] string pathPattern, 
            params string[] queues)
        {
            if (storage == null) throw new ArgumentNullException(nameof(storage));

            if (queues.Length == 0)
            {
                queues = new[] { EnqueuedState.DefaultQueue }; 
            }

            var provider = new MsmqJobQueueProvider(pathPattern, queues, transactionType);
            storage.QueueProviders.Add(provider, queues);

            return storage;
        }
        public static SqlServerStorage UseMsmqQueues(
            [NotNull] this SqlServerStorage storage,
            MsmqTransactionType transactionType,
            [NotNull] string pathPattern,
            params string[] queues)
        {
            if (storage == null)
            {
                throw new ArgumentNullException(nameof(storage));
            }

            if (queues.Length == 0)
            {
                queues = new[] { EnqueuedState.DefaultQueue };
            }

            var provider = new MsmqJobQueueProvider(pathPattern, queues, transactionType);

            storage.QueueProviders.Add(provider, queues);

            return(storage);
        }