/// <summary>
 /// Initializes a phone numbers client with a token credential.
 /// <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>
 /// </summary>
 public PhoneNumbersClient(Uri endpoint, TokenCredential tokenCredential, PhoneNumbersClientOptions options = default)
     : this(
         AssertNotNull(endpoint, nameof(endpoint)).AbsoluteUri,
         AssertNotNull(tokenCredential, nameof(tokenCredential)),
         options ?? new PhoneNumbersClientOptions())
 {
 }
Beispiel #2
0
 /// <summary> Initializes a new instance of <see cref="PhoneNumbersClient"/>.</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 PhoneNumbersClient(Uri endpoint, AzureKeyCredential keyCredential, PhoneNumbersClientOptions options = default)
     : this(
         Argument.CheckNotNull(endpoint, nameof(endpoint)).AbsoluteUri,
         Argument.CheckNotNull(keyCredential, nameof(keyCredential)),
         options ?? new PhoneNumbersClientOptions())
 {
 }
 private PhoneNumbersClient(string endpoint, HttpPipeline httpPipeline, PhoneNumbersClientOptions options)
     : this(new ClientDiagnostics(options), httpPipeline, endpoint, options.Version)
 {
 }
 private PhoneNumbersClient(string endpoint, TokenCredential tokenCredential, PhoneNumbersClientOptions options)
     : this(endpoint, options.BuildHttpPipeline(tokenCredential), options)
 {
 }
 private PhoneNumbersClient(string endpoint, AzureKeyCredential keyCredential, PhoneNumbersClientOptions options)
     : this(endpoint, options.BuildHttpPipeline(keyCredential), options)
 {
 }
 private PhoneNumbersClient(ConnectionString connectionString, PhoneNumbersClientOptions options)
     : this(connectionString.GetRequired("endpoint"), options.BuildHttpPipeline(connectionString), options)
 {
 }
 /// <summary>
 /// Initializes a phone numbers client with an Azure resource connection string and client options.
 /// </summary>
 public PhoneNumbersClient(string connectionString, PhoneNumbersClientOptions options)
     : this(
         ConnectionString.Parse(AssertNotNullOrEmpty(connectionString, nameof(connectionString))),
         options ?? new PhoneNumbersClientOptions())
 {
 }