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;
        }
        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);
        }
Esempio n. 3
0
        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;
        }
        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);
        }