コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ManagedPrivateEndpointsClient"/>.
 /// </summary>
 public ManagedPrivateEndpointsClient(Uri endpoint, TokenCredential credential, ManagedPrivateEndpointsClientOptions options)
     : this(new ClientDiagnostics(options),
            SynapseClientPipeline.Build(options, credential),
            endpoint.ToString(),
            options.VersionString)
 {
 }
コード例 #2
0
        public ManagedPrivateEndpointsClient(Uri endpoint, TokenCredential credential, ManagedPrivateEndpointsClientOptions options = null)
        {
            if (endpoint == null)
            {
                throw new ArgumentNullException(nameof(endpoint));
            }
            if (credential == null)
            {
                throw new ArgumentNullException(nameof(credential));
            }

            options ??= new ManagedPrivateEndpointsClientOptions();
            _clientDiagnostics = new ClientDiagnostics(options);
            string[] scopes = { "https://dev.azuresynapse.net/.default" };
            _pipeline  = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes));
            RestClient = new ManagedPrivateEndpointsRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version);
        }