/// <summary> Initializes a new instance of <see cref="CallingServerClient"/>.</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 CallingServerClient(Uri endpoint, TokenCredential tokenCredential, CallingServerClientOptions options = default)
     : this(
         Argument.CheckNotNull(endpoint, nameof(endpoint)).AbsoluteUri,
         Argument.CheckNotNull(tokenCredential, nameof(tokenCredential)),
         options ?? new CallingServerClientOptions())
 {
 }
Ejemplo n.º 2
0
 /// <summary> Initializes a new instance of <see cref="CallingServerClient"/>.</summary>
 /// <param name="endpoint">The URI of the Azure Communication Services resource.</param>
 /// <param name="credential">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 CallingServerClient(Uri endpoint, TokenCredential credential, CallingServerClientOptions options)
     : this(
         Argument.CheckNotNull(endpoint, nameof(endpoint)).AbsoluteUri,
         Argument.CheckNotNull(credential, nameof(credential)),
         Argument.CheckNotNull(options, nameof(options)))
 {
 }
Ejemplo n.º 3
0
 private CallingServerClient(string endpoint, HttpPipeline httpPipeline, CallingServerClientOptions options)
 {
     _pipeline                = httpPipeline;
     _resourceEndpoint        = endpoint;
     _clientDiagnostics       = new ClientDiagnostics(options);
     _contentDownloader       = new(this);
     CallConnectionRestClient = new CallConnectionsRestClient(_clientDiagnostics, httpPipeline, endpoint, options.ApiVersion);
     ServerCallRestClient     = new ServerCallsRestClient(_clientDiagnostics, httpPipeline, endpoint, options.ApiVersion);
 }
Ejemplo n.º 4
0
 private CallingServerClient(ConnectionString connectionString, CallingServerClientOptions options)
     : this(connectionString.GetRequired("endpoint"), options.BuildHttpPipeline(connectionString), options)
 {
 }
Ejemplo n.º 5
0
 /// <summary> Initializes a new instance of <see cref="CallingServerClient"/>.</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 CallingServerClient(string connectionString, CallingServerClientOptions options)
     : this(
         ConnectionString.Parse(Argument.CheckNotNullOrEmpty(connectionString, nameof(connectionString))),
         Argument.CheckNotNull(options, nameof(options)))
 {
 }
 private CallingServerClient(string endpoint, TokenCredential tokenCredential, CallingServerClientOptions options)
     : this(endpoint, options.BuildHttpPipeline(tokenCredential), options)
 {
 }