private SmsClient(Uri endpoint, SmsClientOptions options, AzureKeyCredential credential)
 {
     _clientDiagnostics = new ClientDiagnostics(options);
     RestClient         = new SmsRestClient(
         _clientDiagnostics,
         options.BuildHttpPipeline(credential),
         endpoint.AbsoluteUri);
 }
        private SmsClient(Uri endpoint, SmsClientOptions options, TokenCredential tokenCredential)
        {
            Argument.AssertNotNull(endpoint, nameof(endpoint));
            Argument.AssertNotNull(tokenCredential, nameof(tokenCredential));

            _clientDiagnostics = new ClientDiagnostics(options);
            RestClient         = new SmsRestClient(
                _clientDiagnostics,
                options.BuildHttpPipeline(tokenCredential),
                endpoint.AbsoluteUri);
        }
예제 #3
0
 private SmsClient(string endpoint, HttpPipeline httpPipeline, SmsClientOptions options)
 {
     _clientDiagnostics = new ClientDiagnostics(options);
     RestClient         = new SmsRestClient(_clientDiagnostics, httpPipeline, endpoint, options.ApiVersion);
 }
예제 #4
0
 /// <summary>Initializes a new instance of <see cref="SmsClient"/> for mocking.</summary>
 protected SmsClient()
 {
     _clientDiagnostics = null;
     RestClient         = null;
 }
 private SmsClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpointUrl)
 {
     RestClient         = new SmsRestClient(clientDiagnostics, pipeline, endpointUrl);
     _clientDiagnostics = clientDiagnostics;
 }
예제 #6
0
 private SmsClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpointUrl, string apiVersion = "2020-07-20-preview1")
 {
     RestClient         = new SmsRestClient(clientDiagnostics, pipeline, endpointUrl, apiVersion);
     _clientDiagnostics = clientDiagnostics;
 }