Exemple #1
0
        public MsmqJobQueue(string pathPattern, MsmqTransactionType transactionType)
        {
            if (pathPattern == null) throw new ArgumentNullException(nameof(pathPattern));

            _pathPattern = pathPattern;
            _transactionType = transactionType;
        }
Exemple #2
0
        public MsmqJobQueue(string pathPattern, MsmqTransactionType transactionType)
        {
            if (pathPattern == null)
            {
                throw new ArgumentNullException(nameof(pathPattern));
            }

            _pathPattern     = pathPattern;
            _transactionType = transactionType;
        }
Exemple #3
0
        public MsmqJobQueue(string pathPattern, MsmqTransactionType transactionType)
        {
            if (pathPattern == null) throw new ArgumentNullException("pathPattern");

            _pathPattern = pathPattern;
            _transactionType = transactionType;

            _formatter = new ThreadLocal<IMessageFormatter>(
                () => new BinaryMessageFormatter());
        }
Exemple #4
0
        public MsmqJobQueue(string pathPattern, MsmqTransactionType transactionType)
        {
            if (pathPattern == null)
            {
                throw new ArgumentNullException("pathPattern");
            }

            _pathPattern     = pathPattern;
            _transactionType = transactionType;

            _formatter = new ThreadLocal <IMessageFormatter>(
                () => new BinaryMessageFormatter());
        }
Exemple #5
0
        public static IGlobalConfiguration<SqlServerStorage> UseMsmqQueues(
            this IGlobalConfiguration<SqlServerStorage> configuration,
            MsmqTransactionType transactionType,
            string pathPattern,
            params string[] queues)
        {
            if (queues.Length == 0)
            {
                queues = new[] { EnqueuedState.DefaultQueue };
            }

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

            return configuration;
        }
Exemple #6
0
        public static IGlobalConfiguration <SqlServerStorage> UseMsmqQueues(
            this IGlobalConfiguration <SqlServerStorage> configuration,
            MsmqTransactionType transactionType,
            string pathPattern,
            params string[] queues)
        {
            if (queues.Length == 0)
            {
                queues = new[] { EnqueuedState.DefaultQueue };
            }

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

            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);
        }
Exemple #9
0
 public MsmqJobQueueProvider(string pathPattern, IEnumerable <string> queues, MsmqTransactionType transactionType)
 {
     _jobQueue      = new MsmqJobQueue(pathPattern, transactionType);
     _monitoringApi = new MsmqJobQueueMonitoringApi(pathPattern, queues);
 }
 public MsmqJobQueueProvider(string pathPattern, IEnumerable<string> queues, MsmqTransactionType transactionType)
 {
     _jobQueue = new MsmqJobQueue(pathPattern, transactionType);
     _monitoringApi = new MsmqJobQueueMonitoringApi(pathPattern, queues);
 }
Exemple #11
0
 private static MsmqJobQueue CreateQueue(MsmqTransactionType transactionType)
 {
     return(new MsmqJobQueue(CleanMsmqQueueAttribute.PathPattern, transactionType));
 }
 private static MsmqJobQueue CreateQueue(MsmqTransactionType transactionType)
 {
     return new MsmqJobQueue(CleanMsmqQueueAttribute.PathPattern, transactionType);
 }