/// <summary> /// Initializes a new instance of the <see cref="QueueClient"/> class. /// </summary> /// <param name="cloudQueueClient">The QueueClient instance.</param> public QueueClient(CloudQueueClient cloudQueueClient) { cloudQueueClient.ValidateNull(); this._cloudQueueClient = cloudQueueClient; this.SetDefaultRetryIfNotExists(this._cloudQueueClient); }
/// <summary> /// Initializes a new instance of the <see cref="QueueStorage" /> class. /// </summary> /// <param name="queueName">Name of the queue.</param> /// <param name="cloudQueueClient">The cloud queue client.</param> /// <param name="createIfNotExists">true to creates the table if it does not already exist; otherwise, false.</param> public QueueStorage(string queueName, CloudQueueClient cloudQueueClient, bool createIfNotExists = true) { queueName.ValidateQueueName(); cloudQueueClient.ValidateNull(); this._queueClient = new QueueClient(cloudQueueClient); this._cloudQueue = this._queueClient.InnerCloudQueueClient.GetQueueReference(queueName); if (createIfNotExists) { this._cloudQueue.CreateIfNotExists(); } }