private CommunicationIdentityClient(Uri endpoint, CommunicationIdentityClientOptions options, TokenCredential tokenCredential) { _clientDiagnostics = new ClientDiagnostics(options); RestClient = new CommunicationIdentityRestClient( _clientDiagnostics, options.BuildHttpPipeline(tokenCredential), endpoint.AbsoluteUri); }
private CommunicationIdentityClient(CommunicationIdentityClientOptions options, ConnectionString connectionString) { _clientDiagnostics = new ClientDiagnostics(options); RestClient = new CommunicationIdentityRestClient( _clientDiagnostics, options.BuildHttpPipeline(connectionString), connectionString.GetRequired("endpoint")); }
private CommunicationIdentityClient(string endpoint, HttpPipeline httpPipeline, CommunicationIdentityClientOptions options) { _clientDiagnostics = new ClientDiagnostics(options); RestClient = new CommunicationIdentityRestClient(_clientDiagnostics, httpPipeline, endpoint, options.ApiVersion); }
private CommunicationIdentityClient(string endpoint, TokenCredential tokenCredential, CommunicationIdentityClientOptions options) : this(endpoint, options.BuildHttpPipeline(tokenCredential), options) { }
private CommunicationIdentityClient(string endpoint, AzureKeyCredential keyCredential, CommunicationIdentityClientOptions options) : this(endpoint, options.BuildHttpPipeline(keyCredential), options) { }
private CommunicationIdentityClient(ConnectionString connectionString, CommunicationIdentityClientOptions options) : this(connectionString.GetRequired("endpoint"), options.BuildHttpPipeline(connectionString), options) { }
/// <summary> Initializes a new instance of <see cref="CommunicationIdentityClient"/>.</summary> /// <param name="endpoint">The URI of the Azure Communication Services resource.</param> /// <param name="tokenCredential">The <see cref="TokenCredential"/> used to authenticate requests, such as DefaultAzureCredential.</param> /// <param name="options">Client option exposing <see cref="ClientOptions.Diagnostics"/>, <see cref="ClientOptions.Retry"/>, <see cref="ClientOptions.Transport"/>, etc.</param> public CommunicationIdentityClient(Uri endpoint, TokenCredential tokenCredential, CommunicationIdentityClientOptions options = default) : this( AssertNotNull(endpoint, nameof(endpoint)).AbsoluteUri, AssertNotNull(tokenCredential, nameof(tokenCredential)), options ?? new CommunicationIdentityClientOptions()) { }
/// <summary> Initializes a new instance of <see cref="CommunicationIdentityClient"/>.</summary> /// <param name="connectionString">Connection string acquired from the Azure Communication Services resource.</param> /// <param name="options">Client option exposing <see cref="ClientOptions.Diagnostics"/>, <see cref="ClientOptions.Retry"/>, <see cref="ClientOptions.Transport"/>, etc.</param> public CommunicationIdentityClient(string connectionString, CommunicationIdentityClientOptions options) : this( ConnectionString.Parse(AssertNotNullOrEmpty(connectionString, nameof(connectionString))), options ?? new CommunicationIdentityClientOptions()) { }
/// <summary> Initializes a new instance of <see cref="CommunicationIdentityClient"/>.</summary> /// <param name="endpoint">The URI of the Azure Communication Services resource.</param> /// <param name="keyCredential">The <see cref="AzureKeyCredential"/> used to authenticate requests.</param> /// <param name="options">Client option exposing <see cref="ClientOptions.Diagnostics"/>, <see cref="ClientOptions.Retry"/>, <see cref="ClientOptions.Transport"/>, etc.</param> public CommunicationIdentityClient(Uri endpoint, AzureKeyCredential keyCredential, CommunicationIdentityClientOptions options = default) : this( Argument.CheckNotNull(endpoint, nameof(endpoint)).AbsoluteUri, Argument.CheckNotNull(keyCredential, nameof(keyCredential)), options ?? new CommunicationIdentityClientOptions()) { }
/// <summary> Initializes a new instance of <see cref="CommunicationIdentityClient"/>.</summary> /// <param name="endpoint">The URI of the Azure Communication Services resource.</param> /// <param name="keyCredential">The <see cref="AzureKeyCredential"/> used to authenticate requests.</param> /// <param name="options">Client option exposing <see cref="ClientOptions.Diagnostics"/>, <see cref="ClientOptions.Retry"/>, <see cref="ClientOptions.Transport"/>, etc.</param> public CommunicationIdentityClient(Uri endpoint, AzureKeyCredential keyCredential, CommunicationIdentityClientOptions options = default) : this( AssertNotNull(endpoint, nameof(endpoint)), options ?? new CommunicationIdentityClientOptions(), AssertNotNull(keyCredential, nameof(keyCredential))) { }