예제 #1
0
        public DataFlowClient(string 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 DataFlowRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version);
        }
예제 #2
0
 internal DataFlowClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string apiVersion = "2019-06-01-preview")
 {
     RestClient         = new DataFlowRestClient(clientDiagnostics, pipeline, endpoint, apiVersion);
     _clientDiagnostics = clientDiagnostics;
     _pipeline          = pipeline;
 }
 internal DataFlowClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint)
 {
     RestClient         = new DataFlowRestClient(clientDiagnostics, pipeline, endpoint);
     _clientDiagnostics = clientDiagnostics;
     _pipeline          = pipeline;
 }