/// <summary> /// Initializes a new instance of the <see cref="QueueAttributes"/> class. /// </summary> /// <param name="other">The attributes to clone.</param> public QueueAttributes(QueueAttributes other) { if (other.Metadata != null) { this.Metadata = new NameValueCollection(other.Metadata); } else { this.Metadata = new NameValueCollection(); } this.Uri = other.Uri; }
/// <summary>Initializes a new instance of the <see cref="CloudQueue"/> class.</summary> /// <param name="usePathStyleUris">True to use path style Uris. </param> /// <param name="address">The address. </param> /// <param name="credentials">The credentials. </param> internal CloudQueue(bool? usePathStyleUris, string address, StorageCredentials credentials) { CommonUtils.AssertNotNullOrEmpty("address", address); CommonUtils.AssertNotNull("credentials", credentials); if (!credentials.CanSignRequest) { throw new ArgumentException(SR.CredentialsCantSignRequest, "credentials"); } this.EncodeMessage = true; this.attributes = new QueueAttributes { Uri = new Uri(address) }; var baseAddress = NavigationHelper.GetServiceClientBaseAddress(this.Uri, usePathStyleUris); this.ServiceClient = new CloudQueueClient(baseAddress, credentials); this.Name = NavigationHelper.GetQueueNameFromUri(this.Uri, this.ServiceClient.UsePathStyleUris); }
/// <summary>Initializes a new instance of the <see cref="QueueAttributes"/> class.</summary> /// <param name="other">The attributes to clone. </param> public QueueAttributes(QueueAttributes other) { this.Metadata = other.Metadata != null ? new NameValueCollection(other.Metadata) : new NameValueCollection(); this.Uri = other.Uri; }
/// <summary> /// Initializes a new instance of the <see cref="CloudQueue"/> class. /// </summary> /// <param name="attributes">The attributes of the queue.</param> /// <param name="client">The client.</param> internal CloudQueue(QueueAttributes attributes, CloudQueueClient client) { CommonUtils.AssertNotNull("attributes", attributes); CommonUtils.AssertNotNull("client", client); this.EncodeMessage = true; this.attributes = attributes; this.ServiceClient = client; this.Name = NavigationHelper.GetQueueNameFromUri(this.Uri, this.ServiceClient.UsePathStyleUris); }
/// <summary> /// Initializes a new instance of the <see cref="CloudQueue"/> class. /// </summary> /// <param name="queueAddress">The queue address.</param> /// <param name="client">The client.</param> internal CloudQueue(Uri queueAddress, CloudQueueClient client) { CommonUtils.AssertNotNull("queueAddress", queueAddress); CommonUtils.AssertNotNull("client", client); this.EncodeMessage = true; this.attributes = new QueueAttributes() { Uri = queueAddress }; this.ServiceClient = client; this.Name = NavigationHelper.GetQueueNameFromUri(this.Uri, this.ServiceClient.UsePathStyleUris); }