/// <summary> /// Creates a new queue with the specified parameters. /// </summary> /// <param name="createQueueParameters">Specifies the parameters for the new queue.</param> /// <returns>Returns the queue management section that appears after creating a new queue.</returns> public ManageQueueSection CreateQueue( CreateQueueParameters createQueueParameters) { if (createQueueParameters == null) { throw new ArgumentNullException(nameof(createQueueParameters)); } var createQueueName = createQueueParameters.QueueName; if (createQueueParameters.RandomizeQueueName) { createQueueName += StringUtilities.RandomString(4); } // Enter parameters in to form. this.queueName.SelectAndSendKeys(createQueueName); this.maxQueueSizeMegabytes.SelectAndSendKeys(createQueueParameters.StorageCapacityMegabytes); this.storageCapacityScaleOutThresholdPercentage.SelectAndSendKeys(createQueueParameters.ScaleUpThresholdPercentage); // Submit this.createQueueButton.Click(); // Wait for it to finish this.createQueueAjaxStatusSection.WaitForResult(maxDuration: TimeSpan.FromSeconds(30)); // Return queue info return(new ManageQueueSection(this.WebBrowserDriver)); }
CreateQueue() { var createParams = new CreateQueueParameters( queueName: "test", storageCapacityMegabytes: 1024, scaleUpThresholdPercentage: 1, randomizeQueueName: true ); return this.CreateQueue(createParams); }
CreateQueue() { var createParams = new CreateQueueParameters( queueName: "test", storageCapacityMegabytes: 1024, scaleUpThresholdPercentage: 1, randomizeQueueName: true ); return(this.CreateQueue(createParams)); }
/// <summary> /// Creates a new queue with the specified parameters. /// </summary> /// <param name="createQueueParameters">Specifies the parameters for the new queue.</param> /// <returns>Returns the queue management section that appears after creating a new queue.</returns> public ManageQueueSection CreateQueue( CreateQueueParameters createQueueParameters) { if (createQueueParameters == null) throw new ArgumentNullException(nameof(createQueueParameters)); var createQueueName = createQueueParameters.QueueName; if (createQueueParameters.RandomizeQueueName) createQueueName += StringUtilities.RandomString(4); // Enter parameters in to form. this.queueName.Clear(); this.queueName.SendKeys(createQueueName); this.maxQueueSizeMegabytes.Clear(); this.maxQueueSizeMegabytes.SendKeys(createQueueParameters.StorageCapacityMegabytes.ToString(CultureInfo.InvariantCulture)); this.storageCapacityScaleOutThresholdPercentage.Clear(); this.storageCapacityScaleOutThresholdPercentage.SendKeys(createQueueParameters.ScaleUpThresholdPercentage.ToString(CultureInfo.InvariantCulture)); // Submit this.createQueueButton.Click(); // Wait for it to finish Poll.Value( from: () => this.ajaxStatus.Text, until: text => text != "COMPLETED", maxDuration: TimeSpan.FromSeconds(15), interval: TimeSpan.FromMilliseconds(500) ); // Check the result if (this.ajaxResult.Text == "FAILED") throw new InvalidOperationException(this.ajaxStatusMessage.Text); // Return queue info return new ManageQueueSection(this.WebBrowserDriver); }