コード例 #1
0
 /// <summary> Initializes a new instance of <see cref="CommunicationRelayClient"/>.</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 CommunicationRelayClient(string connectionString, CommunicationRelayClientOptions options)
     : this(
         ConnectionString.Parse(Argument.CheckNotNullOrEmpty(connectionString, nameof(connectionString))),
         options ?? new CommunicationRelayClientOptions())
 {
 }
コード例 #2
0
 /// <summary> Initializes a new instance of <see cref="CommunicationRelayClient"/>.</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 CommunicationRelayClient(Uri endpoint, AzureKeyCredential keyCredential, CommunicationRelayClientOptions options = default)
     : this(
         Argument.CheckNotNull(endpoint, nameof(endpoint)).AbsoluteUri,
         Argument.CheckNotNull(keyCredential, nameof(keyCredential)),
         options ?? new CommunicationRelayClientOptions())
 {
 }
コード例 #3
0
 private CommunicationRelayClient(string endpoint, HttpPipeline httpPipeline, CommunicationRelayClientOptions options)
 {
     _clientDiagnostics = new ClientDiagnostics(options);
     RestClient         = new CommunicationNetworkTraversalRestClient(_clientDiagnostics, httpPipeline, endpoint, options.ApiVersion);
 }
コード例 #4
0
 private CommunicationRelayClient(string endpoint, TokenCredential tokenCredential, CommunicationRelayClientOptions options)
     : this(endpoint, options.BuildHttpPipeline(tokenCredential), options)
 {
 }
コード例 #5
0
 private CommunicationRelayClient(string endpoint, AzureKeyCredential keyCredential, CommunicationRelayClientOptions options)
     : this(endpoint, options.BuildHttpPipeline(keyCredential), options)
 {
 }
コード例 #6
0
 private CommunicationRelayClient(ConnectionString connectionString, CommunicationRelayClientOptions options)
     : this(connectionString.GetRequired("endpoint"), options.BuildHttpPipeline(connectionString), options)
 {
 }
コード例 #7
0
 /// <summary> Initializes a new instance of <see cref="CommunicationRelayClient"/>.</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 CommunicationRelayClient(Uri endpoint, TokenCredential tokenCredential, CommunicationRelayClientOptions options = default)
     : this(
         AssertNotNull(endpoint, nameof(endpoint)).AbsoluteUri,
         AssertNotNull(tokenCredential, nameof(tokenCredential)),
         options ?? new CommunicationRelayClientOptions())
 {
 }