예제 #1
0
 /// <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())
 {
 }
예제 #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())
 {
 }
예제 #3
0
 private PhoneNumbersClient(string endpoint, HttpPipeline httpPipeline, PhoneNumbersClientOptions options)
     : this(new ClientDiagnostics(options), httpPipeline, endpoint, options.Version)
 {
 }
예제 #4
0
 private PhoneNumbersClient(string endpoint, TokenCredential tokenCredential, PhoneNumbersClientOptions options)
     : this(endpoint, options.BuildHttpPipeline(tokenCredential), options)
 {
 }
예제 #5
0
 private PhoneNumbersClient(string endpoint, AzureKeyCredential keyCredential, PhoneNumbersClientOptions options)
     : this(endpoint, options.BuildHttpPipeline(keyCredential), options)
 {
 }
예제 #6
0
 private PhoneNumbersClient(ConnectionString connectionString, PhoneNumbersClientOptions options)
     : this(connectionString.GetRequired("endpoint"), options.BuildHttpPipeline(connectionString), options)
 {
 }
예제 #7
0
 /// <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())
 {
 }