public static SqlServerStorage UseAzureQueues(
            this SqlServerStorage storage,
            CloudQueueClient client,
            QueueStorageOptions options,
            params string[] queues)
        {
            if (storage == null)
            {
                throw new ArgumentNullException("storage");
            }
            if (client == null)
            {
                throw new ArgumentNullException("client");
            }
            if (options == null)
            {
                throw new ArgumentNullException("options");
            }

            var provider = new QueueStorageJobQueueProvider(client, options, queues);

            storage.QueueProviders.Add(provider, queues);

            return(storage);
        }
        public QueueStorageJobQueue(CloudQueueClient client, QueueStorageOptions options)
        {
            if (client == null)
            {
                throw new ArgumentNullException("client");
            }
            if (options == null)
            {
                throw new ArgumentNullException("options");
            }

            _client  = client;
            _options = options;
        }
示例#3
0
        public QueueStorageJobQueueProvider(
            CloudQueueClient client,
            QueueStorageOptions options,
            string[] queues)
        {
            if (client == null)
            {
                throw new ArgumentNullException("client");
            }
            if (options == null)
            {
                throw new ArgumentNullException("options");
            }
            if (queues == null)
            {
                throw new ArgumentNullException("queues");
            }

            _client  = client;
            _options = options;
            _queues  = queues;

            CreateQueuesIfNotExists();
        }