/// <summary> Initializes a new instance of <see cref="ConversationClient"/>.</summary> /// <param name="endpoint">The URI of the Azure Communication Services resource.</param> /// <param name="tokenCredential">The 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 ConversationClient(Uri endpoint, TokenCredential tokenCredential, CallClientOptions options = default) : this( Argument.CheckNotNull(endpoint, nameof(endpoint)).AbsoluteUri, Argument.CheckNotNull(tokenCredential, nameof(tokenCredential)), options ?? new CallClientOptions()) { }
/// <summary> Initializes a new instance of <see cref="CallClient"/>.</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 CallClient(Uri endpoint, AzureKeyCredential keyCredential, CallClientOptions options = default) : this( Argument.CheckNotNull(endpoint, nameof(endpoint)).AbsoluteUri, Argument.CheckNotNull(keyCredential, nameof(keyCredential)), options ?? new CallClientOptions()) { }
private ConversationClient(string endpoint, HttpPipeline httpPipeline, CallClientOptions options) { _clientDiagnostics = new ClientDiagnostics(options); _pipeline = httpPipeline; _resourceEndpoint = endpoint; _contentDownloader = new(this); RestClient = new ConversationRestClient(_clientDiagnostics, httpPipeline, endpoint, options.ApiVersion); }
private ConversationClient(string endpoint, AzureKeyCredential keyCredential, CallClientOptions options) : this(endpoint, options.BuildHttpPipeline(keyCredential), options) { }
private ConversationClient(string endpoint, TokenCredential tokenCredential, CallClientOptions options) : this(endpoint, options.BuildHttpPipeline(tokenCredential), options) { }
private ConversationClient(ConnectionString connectionString, CallClientOptions options) : this(connectionString.GetRequired("endpoint"), options.BuildHttpPipeline(connectionString), options) { }
/// <summary> Initializes a new instance of <see cref="ConversationClient"/>.</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 ConversationClient(string connectionString, CallClientOptions options) : this( ConnectionString.Parse(Argument.CheckNotNullOrEmpty(connectionString, nameof(connectionString))), options ?? new CallClientOptions()) { }
private CallClient(string endpoint, HttpPipeline httpPipeline, CallClientOptions options) { _clientDiagnostics = new ClientDiagnostics(options); RestClient = new CallRestClient(_clientDiagnostics, httpPipeline, endpoint, options.ApiVersion); }