Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DatasetClient"/>.
 /// </summary>
 public DatasetClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options)
     : this(new ClientDiagnostics(options),
            SynapseClientPipeline.Build(options, credential),
            endpoint.ToString(),
            options.VersionString)
 {
 }
Ejemplo n.º 2
0
        public IntegrationRuntimesClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null)
        {
            if (endpoint == null)
            {
                throw new ArgumentNullException(nameof(endpoint));
            }
            if (credential == null)
            {
                throw new ArgumentNullException(nameof(credential));
            }

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