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);
        }
Exemplo n.º 3
0
 private SmsClient(string endpoint, HttpPipeline httpPipeline, SmsClientOptions options)
 {
     _clientDiagnostics = new ClientDiagnostics(options);
     RestClient         = new SmsRestClient(_clientDiagnostics, httpPipeline, endpoint, options.ApiVersion);
 }
Exemplo n.º 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;
 }
Exemplo n.º 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;
 }