< Summary

Class:Azure.Analytics.Synapse.Artifacts.PipelineRunClient
Assembly:Azure.Analytics.Synapse.Artifacts
File(s):C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Customization\PipelineRunClient.cs
C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\PipelineRunClient.cs
Covered lines:0
Uncovered lines:76
Coverable lines:76
Total lines:220
Line coverage:0% (0 of 76)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%100%
.ctor(...)-0%100%
.ctor(...)-0%100%
get_RestClient()-0%100%
.ctor()-0%100%
.ctor(...)-0%100%
.ctor(...)-0%100%
QueryPipelineRunsByWorkspaceAsync()-0%100%
QueryPipelineRunsByWorkspace(...)-0%100%
GetPipelineRunAsync()-0%100%
GetPipelineRun(...)-0%100%
QueryActivityRunsAsync()-0%100%
QueryActivityRuns(...)-0%100%
CancelPipelineRunAsync()-0%100%
CancelPipelineRun(...)-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Customization\PipelineRunClient.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System;
 5using Azure.Core;
 6using Azure.Core.Pipeline;
 7
 8namespace Azure.Analytics.Synapse.Artifacts
 9{
 10    public partial class PipelineRunClient
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="PipelineRunClient"/>.
 14        /// </summary>
 15        public PipelineRunClient(Uri endpoint, TokenCredential credential)
 016            : this(endpoint, credential, ArtifactsClientOptions.Default)
 17        {
 018        }
 19
 20        /// <summary>
 21        /// Initializes a new instance of the <see cref="PipelineRunClient"/>.
 22        /// </summary>
 23        public PipelineRunClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options)
 024            : this(new ClientDiagnostics(options),
 025                  SynapseClientPipeline.Build(options, credential),
 026                  endpoint.ToString(),
 027                  options.VersionString)
 28        {
 029        }
 30    }
 31}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\PipelineRunClient.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System;
 9using System.Threading;
 10using System.Threading.Tasks;
 11using Azure;
 12using Azure.Analytics.Synapse.Artifacts.Models;
 13using Azure.Core.Pipeline;
 14
 15namespace Azure.Analytics.Synapse.Artifacts
 016{
 17    /// <summary> The PipelineRun service client. </summary>
 018    public partial class PipelineRunClient
 19    {
 20        private readonly ClientDiagnostics _clientDiagnostics;
 21        private readonly HttpPipeline _pipeline;
 022        internal PipelineRunRestClient RestClient { get; }
 23        /// <summary> Initializes a new instance of PipelineRunClient for mocking. </summary>
 024        protected PipelineRunClient()
 025        {
 026        }
 027        /// <summary> Initializes a new instance of PipelineRunClient. </summary>
 28        /// <param name="clientDiagnostics"> The handler for diagnostic messaging in the client. </param>
 029        /// <param name="pipeline"> The HTTP pipeline for sending and receiving REST requests and responses. </param>
 30        /// <param name="endpoint"> The workspace development endpoint, for example https://myworkspace.dev.azuresynapse
 31        /// <param name="apiVersion"> Api Version. </param>
 032        internal PipelineRunClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string a
 33        {
 034            RestClient = new PipelineRunRestClient(clientDiagnostics, pipeline, endpoint, apiVersion);
 035            _clientDiagnostics = clientDiagnostics;
 036            _pipeline = pipeline;
 037        }
 38
 39        /// <summary> Query pipeline runs in the workspace based on input filter conditions. </summary>
 40        /// <param name="filterParameters"> Parameters to filter the pipeline run. </param>
 41        /// <param name="cancellationToken"> The cancellation token to use. </param>
 42        public virtual async Task<Response<PipelineRunsQueryResponse>> QueryPipelineRunsByWorkspaceAsync(RunFilterParame
 43        {
 044            using var scope = _clientDiagnostics.CreateScope("PipelineRunClient.QueryPipelineRunsByWorkspace");
 045            scope.Start();
 46            try
 47            {
 048                return await RestClient.QueryPipelineRunsByWorkspaceAsync(filterParameters, cancellationToken).Configure
 49            }
 050            catch (Exception e)
 51            {
 052                scope.Failed(e);
 053                throw;
 54            }
 055        }
 56
 57        /// <summary> Query pipeline runs in the workspace based on input filter conditions. </summary>
 58        /// <param name="filterParameters"> Parameters to filter the pipeline run. </param>
 59        /// <param name="cancellationToken"> The cancellation token to use. </param>
 60        public virtual Response<PipelineRunsQueryResponse> QueryPipelineRunsByWorkspace(RunFilterParameters filterParame
 61        {
 062            using var scope = _clientDiagnostics.CreateScope("PipelineRunClient.QueryPipelineRunsByWorkspace");
 063            scope.Start();
 64            try
 65            {
 066                return RestClient.QueryPipelineRunsByWorkspace(filterParameters, cancellationToken);
 67            }
 068            catch (Exception e)
 69            {
 070                scope.Failed(e);
 071                throw;
 72            }
 073        }
 74
 75        /// <summary> Get a pipeline run by its run ID. </summary>
 76        /// <param name="runId"> The pipeline run identifier. </param>
 77        /// <param name="cancellationToken"> The cancellation token to use. </param>
 78        public virtual async Task<Response<PipelineRun>> GetPipelineRunAsync(string runId, CancellationToken cancellatio
 79        {
 080            using var scope = _clientDiagnostics.CreateScope("PipelineRunClient.GetPipelineRun");
 081            scope.Start();
 82            try
 83            {
 084                return await RestClient.GetPipelineRunAsync(runId, cancellationToken).ConfigureAwait(false);
 85            }
 086            catch (Exception e)
 87            {
 088                scope.Failed(e);
 089                throw;
 90            }
 091        }
 92
 93        /// <summary> Get a pipeline run by its run ID. </summary>
 94        /// <param name="runId"> The pipeline run identifier. </param>
 95        /// <param name="cancellationToken"> The cancellation token to use. </param>
 96        public virtual Response<PipelineRun> GetPipelineRun(string runId, CancellationToken cancellationToken = default)
 97        {
 098            using var scope = _clientDiagnostics.CreateScope("PipelineRunClient.GetPipelineRun");
 099            scope.Start();
 100            try
 101            {
 0102                return RestClient.GetPipelineRun(runId, cancellationToken);
 103            }
 0104            catch (Exception e)
 105            {
 0106                scope.Failed(e);
 0107                throw;
 108            }
 0109        }
 110
 111        /// <summary> Query activity runs based on input filter conditions. </summary>
 112        /// <param name="pipelineName"> The pipeline name. </param>
 113        /// <param name="runId"> The pipeline run identifier. </param>
 114        /// <param name="filterParameters"> Parameters to filter the activity runs. </param>
 115        /// <param name="cancellationToken"> The cancellation token to use. </param>
 116        public virtual async Task<Response<ActivityRunsQueryResponse>> QueryActivityRunsAsync(string pipelineName, strin
 117        {
 0118            using var scope = _clientDiagnostics.CreateScope("PipelineRunClient.QueryActivityRuns");
 0119            scope.Start();
 120            try
 121            {
 0122                return await RestClient.QueryActivityRunsAsync(pipelineName, runId, filterParameters, cancellationToken)
 123            }
 0124            catch (Exception e)
 125            {
 0126                scope.Failed(e);
 0127                throw;
 128            }
 0129        }
 130
 131        /// <summary> Query activity runs based on input filter conditions. </summary>
 132        /// <param name="pipelineName"> The pipeline name. </param>
 133        /// <param name="runId"> The pipeline run identifier. </param>
 134        /// <param name="filterParameters"> Parameters to filter the activity runs. </param>
 135        /// <param name="cancellationToken"> The cancellation token to use. </param>
 136        public virtual Response<ActivityRunsQueryResponse> QueryActivityRuns(string pipelineName, string runId, RunFilte
 137        {
 0138            using var scope = _clientDiagnostics.CreateScope("PipelineRunClient.QueryActivityRuns");
 0139            scope.Start();
 140            try
 141            {
 0142                return RestClient.QueryActivityRuns(pipelineName, runId, filterParameters, cancellationToken);
 143            }
 0144            catch (Exception e)
 145            {
 0146                scope.Failed(e);
 0147                throw;
 148            }
 0149        }
 150
 151        /// <summary> Cancel a pipeline run by its run ID. </summary>
 152        /// <param name="runId"> The pipeline run identifier. </param>
 153        /// <param name="isRecursive"> If true, cancel all the Child pipelines that are triggered by the current pipelin
 154        /// <param name="cancellationToken"> The cancellation token to use. </param>
 155        public virtual async Task<Response> CancelPipelineRunAsync(string runId, bool? isRecursive = null, CancellationT
 156        {
 0157            using var scope = _clientDiagnostics.CreateScope("PipelineRunClient.CancelPipelineRun");
 0158            scope.Start();
 159            try
 160            {
 0161                return await RestClient.CancelPipelineRunAsync(runId, isRecursive, cancellationToken).ConfigureAwait(fal
 162            }
 0163            catch (Exception e)
 164            {
 0165                scope.Failed(e);
 0166                throw;
 167            }
 0168        }
 169
 170        /// <summary> Cancel a pipeline run by its run ID. </summary>
 171        /// <param name="runId"> The pipeline run identifier. </param>
 172        /// <param name="isRecursive"> If true, cancel all the Child pipelines that are triggered by the current pipelin
 173        /// <param name="cancellationToken"> The cancellation token to use. </param>
 174        public virtual Response CancelPipelineRun(string runId, bool? isRecursive = null, CancellationToken cancellation
 175        {
 0176            using var scope = _clientDiagnostics.CreateScope("PipelineRunClient.CancelPipelineRun");
 0177            scope.Start();
 178            try
 179            {
 0180                return RestClient.CancelPipelineRun(runId, isRecursive, cancellationToken);
 181            }
 0182            catch (Exception e)
 183            {
 0184                scope.Failed(e);
 0185                throw;
 186            }
 0187        }
 188    }
 189}