< Summary

Class:Azure.Analytics.Synapse.Artifacts.TriggerRunClient
Assembly:Azure.Analytics.Synapse.Artifacts
File(s):C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Customization\TriggerRunClient.cs
C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\TriggerRunClient.cs
Covered lines:0
Uncovered lines:48
Coverable lines:48
Total lines:144
Line coverage:0% (0 of 48)
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%
RerunTriggerInstanceAsync()-0%100%
RerunTriggerInstance(...)-0%100%
QueryTriggerRunsByWorkspaceAsync()-0%100%
QueryTriggerRunsByWorkspace(...)-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Customization\TriggerRunClient.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 TriggerRunClient
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="TriggerRunClient"/>.
 14        /// </summary>
 15        public TriggerRunClient(Uri endpoint, TokenCredential credential)
 016            : this(endpoint, credential, ArtifactsClientOptions.Default)
 17        {
 018        }
 19
 20        /// <summary>
 21        /// Initializes a new instance of the <see cref="TriggerRunClient"/>.
 22        /// </summary>
 23        public TriggerRunClient(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\TriggerRunClient.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 TriggerRun service client. </summary>
 018    public partial class TriggerRunClient
 19    {
 20        private readonly ClientDiagnostics _clientDiagnostics;
 21        private readonly HttpPipeline _pipeline;
 022        internal TriggerRunRestClient RestClient { get; }
 23        /// <summary> Initializes a new instance of TriggerRunClient for mocking. </summary>
 024        protected TriggerRunClient()
 025        {
 026        }
 027        /// <summary> Initializes a new instance of TriggerRunClient. </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 TriggerRunClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string ap
 33        {
 034            RestClient = new TriggerRunRestClient(clientDiagnostics, pipeline, endpoint, apiVersion);
 035            _clientDiagnostics = clientDiagnostics;
 036            _pipeline = pipeline;
 037        }
 38
 39        /// <summary> Rerun single trigger instance by runId. </summary>
 40        /// <param name="triggerName"> The trigger name. </param>
 41        /// <param name="runId"> The pipeline run identifier. </param>
 42        /// <param name="cancellationToken"> The cancellation token to use. </param>
 43        public virtual async Task<Response> RerunTriggerInstanceAsync(string triggerName, string runId, CancellationToke
 44        {
 045            using var scope = _clientDiagnostics.CreateScope("TriggerRunClient.RerunTriggerInstance");
 046            scope.Start();
 47            try
 48            {
 049                return await RestClient.RerunTriggerInstanceAsync(triggerName, runId, cancellationToken).ConfigureAwait(
 50            }
 051            catch (Exception e)
 52            {
 053                scope.Failed(e);
 054                throw;
 55            }
 056        }
 57
 58        /// <summary> Rerun single trigger instance by runId. </summary>
 59        /// <param name="triggerName"> The trigger name. </param>
 60        /// <param name="runId"> The pipeline run identifier. </param>
 61        /// <param name="cancellationToken"> The cancellation token to use. </param>
 62        public virtual Response RerunTriggerInstance(string triggerName, string runId, CancellationToken cancellationTok
 63        {
 064            using var scope = _clientDiagnostics.CreateScope("TriggerRunClient.RerunTriggerInstance");
 065            scope.Start();
 66            try
 67            {
 068                return RestClient.RerunTriggerInstance(triggerName, runId, cancellationToken);
 69            }
 070            catch (Exception e)
 71            {
 072                scope.Failed(e);
 073                throw;
 74            }
 075        }
 76
 77        /// <summary> Query trigger runs. </summary>
 78        /// <param name="filterParameters"> Parameters to filter the pipeline run. </param>
 79        /// <param name="cancellationToken"> The cancellation token to use. </param>
 80        public virtual async Task<Response<TriggerRunsQueryResponse>> QueryTriggerRunsByWorkspaceAsync(RunFilterParamete
 81        {
 082            using var scope = _clientDiagnostics.CreateScope("TriggerRunClient.QueryTriggerRunsByWorkspace");
 083            scope.Start();
 84            try
 85            {
 086                return await RestClient.QueryTriggerRunsByWorkspaceAsync(filterParameters, cancellationToken).ConfigureA
 87            }
 088            catch (Exception e)
 89            {
 090                scope.Failed(e);
 091                throw;
 92            }
 093        }
 94
 95        /// <summary> Query trigger runs. </summary>
 96        /// <param name="filterParameters"> Parameters to filter the pipeline run. </param>
 97        /// <param name="cancellationToken"> The cancellation token to use. </param>
 98        public virtual Response<TriggerRunsQueryResponse> QueryTriggerRunsByWorkspace(RunFilterParameters filterParamete
 99        {
 0100            using var scope = _clientDiagnostics.CreateScope("TriggerRunClient.QueryTriggerRunsByWorkspace");
 0101            scope.Start();
 102            try
 103            {
 0104                return RestClient.QueryTriggerRunsByWorkspace(filterParameters, cancellationToken);
 105            }
 0106            catch (Exception e)
 107            {
 0108                scope.Failed(e);
 0109                throw;
 110            }
 0111        }
 112    }
 113}