/// <summary> /// Initializes a new instance of the <see cref="QueueServiceClient"/> /// class. /// </summary> /// <param name="serviceUri"> /// A <see cref="Uri"/> referencing the queue service. /// </param> /// <param name="authentication"> /// An optional authentication policy used to sign requests. /// </param> /// <param name="options"> /// Optional client options that define the transport pipeline /// policies for authentication, retries, etc., that are applied to /// every request. /// </param> internal QueueServiceClient(Uri serviceUri, HttpPipelinePolicy authentication, QueueClientOptions options) { _uri = serviceUri; options ??= new QueueClientOptions(); _pipeline = options.Build(authentication); _clientDiagnostics = new ClientDiagnostics(options); }
/// <summary> /// Initializes a new instance of the <see cref="QueueServiceClient"/> /// class. /// </summary> /// <param name="connectionString"> /// A connection string includes the authentication information /// required for your application to access data in an Azure Storage /// account at runtime. /// /// For more information, <see href="https://docs.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string"/>. /// </param> /// <param name="options"> /// Optional client options that define the transport pipeline /// policies for authentication, retries, etc., that are applied to /// every request. /// </param> public QueueServiceClient(string connectionString, QueueClientOptions options) { var conn = StorageConnectionString.Parse(connectionString); _uri = conn.QueueEndpoint; options ??= new QueueClientOptions(); _pipeline = options.Build(conn.Credentials); }
/// <summary> /// Initializes a new instance of the <see cref="QueueServiceClient"/> /// class. /// </summary> /// <param name="serviceUri"> /// A <see cref="Uri"/> referencing the queue service. /// This is likely to be similar to "https://{account_name}.queue.core.windows.net". /// </param> /// <param name="authentication"> /// An optional authentication policy used to sign requests. /// </param> /// <param name="options"> /// Optional client options that define the transport pipeline /// policies for authentication, retries, etc., that are applied to /// every request. /// </param> internal QueueServiceClient(Uri serviceUri, HttpPipelinePolicy authentication, QueueClientOptions options) { _uri = serviceUri; options ??= new QueueClientOptions(); _pipeline = options.Build(authentication); _version = options.Version; _clientDiagnostics = new ClientDiagnostics(options); _clientSideEncryption = QueueClientSideEncryptionOptions.CloneFrom(options._clientSideEncryptionOptions); }
/// <summary> /// Initializes a new instance of the <see cref="QueueServiceClient"/> /// class. /// </summary> /// <param name="connectionString"> /// A connection string includes the authentication information /// required for your application to access data in an Azure Storage /// account at runtime. /// /// For more information, see /// <see href="https://docs.microsoft.com/azure/storage/common/storage-configure-connection-string"> /// Configure Azure Storage connection strings</see>. /// </param> /// <param name="options"> /// Optional client options that define the transport pipeline /// policies for authentication, retries, etc., that are applied to /// every request. /// </param> public QueueServiceClient(string connectionString, QueueClientOptions options) { var conn = StorageConnectionString.Parse(connectionString); _uri = conn.QueueEndpoint; options ??= new QueueClientOptions(); _pipeline = options.Build(conn.Credentials); _version = options.Version; _clientDiagnostics = new ClientDiagnostics(options); _clientSideEncryption = QueueClientSideEncryptionOptions.CloneFrom(options._clientSideEncryptionOptions); }
/// <summary> /// Initializes a new instance of the <see cref="QueueServiceClient"/> /// class. /// </summary> /// <param name="serviceUri"> /// A <see cref="Uri"/> referencing the queue service. /// This is likely to be similar to "https://{account_name}.queue.core.windows.net". /// </param> /// <param name="authentication"> /// An optional authentication policy used to sign requests. /// </param> /// <param name="options"> /// Optional client options that define the transport pipeline /// policies for authentication, retries, etc., that are applied to /// every request. /// </param> /// <param name="storageSharedKeyCredential"> /// The shared key credential used to sign requests. /// </param> internal QueueServiceClient( Uri serviceUri, HttpPipelinePolicy authentication, QueueClientOptions options, StorageSharedKeyCredential storageSharedKeyCredential) { _uri = serviceUri; options ??= new QueueClientOptions(); _pipeline = options.Build(authentication); _version = options.Version; _clientDiagnostics = new ClientDiagnostics(options); _clientSideEncryption = QueueClientSideEncryptionOptions.CloneFrom(options._clientSideEncryptionOptions); _storageSharedKeyCredential = storageSharedKeyCredential; _messageEncoding = options.MessageEncoding; }
/// <summary> /// Initializes a new instance of the <see cref="QueueServiceClient"/> /// class. /// </summary> /// <param name="connectionString"> /// A connection string includes the authentication information /// required for your application to access data in an Azure Storage /// account at runtime. /// /// For more information, see /// <see href="https://docs.microsoft.com/azure/storage/common/storage-configure-connection-string"> /// Configure Azure Storage connection strings</see>. /// </param> /// <param name="options"> /// Optional client options that define the transport pipeline /// policies for authentication, retries, etc., that are applied to /// every request. /// </param> public QueueServiceClient(string connectionString, QueueClientOptions options) { var conn = StorageConnectionString.Parse(connectionString); _uri = conn.QueueEndpoint; options ??= new QueueClientOptions(); _clientConfiguration = new QueueClientConfiguration( pipeline: options.Build(conn.Credentials), sharedKeyCredential: conn.Credentials as StorageSharedKeyCredential, clientDiagnostics: new StorageClientDiagnostics(options), version: options.Version, clientSideEncryption: QueueClientSideEncryptionOptions.CloneFrom(options._clientSideEncryptionOptions), messageEncoding: options.MessageEncoding, queueMessageDecodingFailedHandlers: options.GetMessageDecodingFailedHandlers()); _serviceRestClient = BuildServiceRestClient(); }
/// <summary> /// Initializes a new instance of the <see cref="QueueServiceClient"/> /// class. /// </summary> /// <param name="serviceUri"> /// A <see cref="Uri"/> referencing the queue service. /// This is likely to be similar to "https://{account_name}.queue.core.windows.net". /// </param> /// <param name="authentication"> /// An optional authentication policy used to sign requests. /// </param> /// <param name="options"> /// Optional client options that define the transport pipeline /// policies for authentication, retries, etc., that are applied to /// every request. /// </param> /// <param name="storageSharedKeyCredential"> /// The shared key credential used to sign requests. /// </param> internal QueueServiceClient( Uri serviceUri, HttpPipelinePolicy authentication, QueueClientOptions options, StorageSharedKeyCredential storageSharedKeyCredential) { Argument.AssertNotNull(serviceUri, nameof(serviceUri)); _uri = serviceUri; options ??= new QueueClientOptions(); _clientConfiguration = new QueueClientConfiguration( pipeline: options.Build(authentication), sharedKeyCredential: storageSharedKeyCredential, clientDiagnostics: new StorageClientDiagnostics(options), version: options.Version, clientSideEncryption: QueueClientSideEncryptionOptions.CloneFrom(options._clientSideEncryptionOptions), messageEncoding: options.MessageEncoding, queueMessageDecodingFailedHandlers: options.GetMessageDecodingFailedHandlers()); _serviceRestClient = BuildServiceRestClient(); }