/// <summary> /// Initializes a new instance of the <see cref="FileServiceClient"/> /// 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 FileServiceClient(string connectionString, FileClientOptions options) { var conn = StorageConnectionString.Parse(connectionString); this._uri = conn.FileEndpoint; this._pipeline = (options ?? new FileClientOptions()).Build(conn.Credentials); }
/// <summary> /// Initializes a new instance of the <see cref="FileServiceClient"/> /// 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 FileServiceClient(string connectionString, FileClientOptions options) { options ??= new FileClientOptions(); var conn = StorageConnectionString.Parse(connectionString); _uri = conn.FileEndpoint; _pipeline = options.Build(conn.Credentials); _clientDiagnostics = new ClientDiagnostics(options); }
/// <summary> /// Initializes a new instance of the <see cref="FileServiceClient"/> /// class. /// </summary> /// <param name="serviceUri"> /// A <see cref="Uri"/> referencing the file 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 FileServiceClient(Uri serviceUri, HttpPipelinePolicy authentication, FileClientOptions options) { this._uri = serviceUri; this._pipeline = (options ?? new FileClientOptions()).Build(authentication); }
/// <summary> /// Initializes a new instance of the <see cref="FileServiceClient"/> /// class. /// </summary> /// <param name="serviceUri"> /// A <see cref="Uri"/> referencing the file service. /// </param> /// <param name="credential"> /// The shared key credential 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> public FileServiceClient(Uri serviceUri, StorageSharedKeyCredential credential, FileClientOptions options = default) : this(serviceUri, credential.AsPolicy(), options) { }
/// <summary> /// Initializes a new instance of the <see cref="FileServiceClient"/> /// class. /// </summary> /// <param name="serviceUri"> /// A <see cref="Uri"/> referencing the file service. /// </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 FileServiceClient(Uri serviceUri, FileClientOptions options = default) : this(serviceUri, (HttpPipelinePolicy)null, options) { }
/// <summary> /// Initializes a new instance of the <see cref="FileServiceClient"/> /// class. /// </summary> /// <param name="serviceUri"> /// A <see cref="Uri"/> referencing the file 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 FileServiceClient(Uri serviceUri, HttpPipelinePolicy authentication, FileClientOptions options) { options ??= new FileClientOptions(); _uri = serviceUri; _pipeline = options.Build(authentication); _clientDiagnostics = new ClientDiagnostics(options); }