예제 #1
0
 /// <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())
 {
 }
예제 #2
0
 /// <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())
 {
 }
예제 #3
0
 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);
 }
예제 #4
0
 private ConversationClient(string endpoint, AzureKeyCredential keyCredential, CallClientOptions options)
     : this(endpoint, options.BuildHttpPipeline(keyCredential), options)
 {
 }
예제 #5
0
 private ConversationClient(string endpoint, TokenCredential tokenCredential, CallClientOptions options)
     : this(endpoint, options.BuildHttpPipeline(tokenCredential), options)
 {
 }
예제 #6
0
 private ConversationClient(ConnectionString connectionString, CallClientOptions options)
     : this(connectionString.GetRequired("endpoint"), options.BuildHttpPipeline(connectionString), options)
 {
 }
예제 #7
0
 /// <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())
 {
 }
예제 #8
0
 private CallClient(string endpoint, HttpPipeline httpPipeline, CallClientOptions options)
 {
     _clientDiagnostics = new ClientDiagnostics(options);
     RestClient         = new CallRestClient(_clientDiagnostics, httpPipeline, endpoint, options.ApiVersion);
 }