< Summary

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

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%
AddDataFlowAsync()-0%100%
AddDataFlow(...)-0%100%
DeleteDataFlowDebugSessionAsync()-0%100%
DeleteDataFlowDebugSession(...)-0%100%
<QueryDataFlowDebugSessionsByWorkspaceAsync()-0%100%
<QueryDataFlowDebugSessionsByWorkspaceAsync()-0%100%
QueryDataFlowDebugSessionsByWorkspaceAsync(...)-0%100%
QueryDataFlowDebugSessionsByWorkspace(...)-0%100%
StartCreateDataFlowDebugSessionAsync()-0%0%
StartCreateDataFlowDebugSession(...)-0%0%
StartExecuteCommandAsync()-0%0%
StartExecuteCommand(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Customization\DataFlowDebugSessionClient.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 DataFlowDebugSessionClient
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="DataFlowDebugSessionClient"/>.
 14        /// </summary>
 15        public DataFlowDebugSessionClient(Uri endpoint, TokenCredential credential)
 016            : this(endpoint, credential, ArtifactsClientOptions.Default)
 17        {
 018        }
 19
 20        /// <summary>
 21        /// Initializes a new instance of the <see cref="DataFlowDebugSessionClient"/>.
 22        /// </summary>
 23        public DataFlowDebugSessionClient(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\DataFlowDebugSessionClient.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;
 14using Azure.Core.Pipeline;
 15
 016namespace Azure.Analytics.Synapse.Artifacts
 17{
 018    /// <summary> The DataFlowDebugSession service client. </summary>
 19    public partial class DataFlowDebugSessionClient
 20    {
 21        private readonly ClientDiagnostics _clientDiagnostics;
 22        private readonly HttpPipeline _pipeline;
 023        internal DataFlowDebugSessionRestClient RestClient { get; }
 024        /// <summary> Initializes a new instance of DataFlowDebugSessionClient for mocking. </summary>
 025        protected DataFlowDebugSessionClient()
 026        {
 027        }
 28        /// <summary> Initializes a new instance of DataFlowDebugSessionClient. </summary>
 029        /// <param name="clientDiagnostics"> The handler for diagnostic messaging in the client. </param>
 30        /// <param name="pipeline"> The HTTP pipeline for sending and receiving REST requests and responses. </param>
 31        /// <param name="endpoint"> The workspace development endpoint, for example https://myworkspace.dev.azuresynapse
 32        /// <param name="apiVersion"> Api Version. </param>
 033        internal DataFlowDebugSessionClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint,
 34        {
 035            RestClient = new DataFlowDebugSessionRestClient(clientDiagnostics, pipeline, endpoint, apiVersion);
 036            _clientDiagnostics = clientDiagnostics;
 037            _pipeline = pipeline;
 038        }
 39
 40        /// <summary> Add a data flow into debug session. </summary>
 41        /// <param name="request"> Data flow debug session definition with debug content. </param>
 42        /// <param name="cancellationToken"> The cancellation token to use. </param>
 43        public virtual async Task<Response<AddDataFlowToDebugSessionResponse>> AddDataFlowAsync(DataFlowDebugPackage req
 44        {
 045            using var scope = _clientDiagnostics.CreateScope("DataFlowDebugSessionClient.AddDataFlow");
 046            scope.Start();
 47            try
 48            {
 049                return await RestClient.AddDataFlowAsync(request, cancellationToken).ConfigureAwait(false);
 50            }
 051            catch (Exception e)
 52            {
 053                scope.Failed(e);
 054                throw;
 55            }
 056        }
 57
 58        /// <summary> Add a data flow into debug session. </summary>
 59        /// <param name="request"> Data flow debug session definition with debug content. </param>
 60        /// <param name="cancellationToken"> The cancellation token to use. </param>
 61        public virtual Response<AddDataFlowToDebugSessionResponse> AddDataFlow(DataFlowDebugPackage request, Cancellatio
 62        {
 063            using var scope = _clientDiagnostics.CreateScope("DataFlowDebugSessionClient.AddDataFlow");
 064            scope.Start();
 65            try
 66            {
 067                return RestClient.AddDataFlow(request, cancellationToken);
 68            }
 069            catch (Exception e)
 70            {
 071                scope.Failed(e);
 072                throw;
 73            }
 074        }
 75
 76        /// <summary> Deletes a data flow debug session. </summary>
 77        /// <param name="request"> Data flow debug session definition for deletion. </param>
 78        /// <param name="cancellationToken"> The cancellation token to use. </param>
 79        public virtual async Task<Response> DeleteDataFlowDebugSessionAsync(DeleteDataFlowDebugSessionRequest request, C
 80        {
 081            using var scope = _clientDiagnostics.CreateScope("DataFlowDebugSessionClient.DeleteDataFlowDebugSession");
 082            scope.Start();
 83            try
 84            {
 085                return await RestClient.DeleteDataFlowDebugSessionAsync(request, cancellationToken).ConfigureAwait(false
 86            }
 087            catch (Exception e)
 88            {
 089                scope.Failed(e);
 090                throw;
 91            }
 092        }
 93
 94        /// <summary> Deletes a data flow debug session. </summary>
 95        /// <param name="request"> Data flow debug session definition for deletion. </param>
 96        /// <param name="cancellationToken"> The cancellation token to use. </param>
 97        public virtual Response DeleteDataFlowDebugSession(DeleteDataFlowDebugSessionRequest request, CancellationToken 
 98        {
 099            using var scope = _clientDiagnostics.CreateScope("DataFlowDebugSessionClient.DeleteDataFlowDebugSession");
 0100            scope.Start();
 101            try
 102            {
 0103                return RestClient.DeleteDataFlowDebugSession(request, cancellationToken);
 104            }
 0105            catch (Exception e)
 106            {
 0107                scope.Failed(e);
 0108                throw;
 109            }
 0110        }
 111
 112        /// <summary> Query all active data flow debug sessions. </summary>
 113        /// <param name="cancellationToken"> The cancellation token to use. </param>
 114        public virtual AsyncPageable<DataFlowDebugSessionInfo> QueryDataFlowDebugSessionsByWorkspaceAsync(CancellationTo
 115        {
 116            async Task<Page<DataFlowDebugSessionInfo>> FirstPageFunc(int? pageSizeHint)
 117            {
 0118                using var scope = _clientDiagnostics.CreateScope("DataFlowDebugSessionClient.QueryDataFlowDebugSessionsB
 0119                scope.Start();
 120                try
 121                {
 0122                    var response = await RestClient.QueryDataFlowDebugSessionsByWorkspaceAsync(cancellationToken).Config
 0123                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 124                }
 0125                catch (Exception e)
 126                {
 0127                    scope.Failed(e);
 0128                    throw;
 129                }
 0130            }
 131            async Task<Page<DataFlowDebugSessionInfo>> NextPageFunc(string nextLink, int? pageSizeHint)
 132            {
 0133                using var scope = _clientDiagnostics.CreateScope("DataFlowDebugSessionClient.QueryDataFlowDebugSessionsB
 0134                scope.Start();
 135                try
 136                {
 0137                    var response = await RestClient.QueryDataFlowDebugSessionsByWorkspaceNextPageAsync(nextLink, cancell
 0138                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 139                }
 0140                catch (Exception e)
 141                {
 0142                    scope.Failed(e);
 0143                    throw;
 144                }
 0145            }
 0146            return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
 147        }
 148
 149        /// <summary> Query all active data flow debug sessions. </summary>
 150        /// <param name="cancellationToken"> The cancellation token to use. </param>
 151        public virtual Pageable<DataFlowDebugSessionInfo> QueryDataFlowDebugSessionsByWorkspace(CancellationToken cancel
 152        {
 153            Page<DataFlowDebugSessionInfo> FirstPageFunc(int? pageSizeHint)
 154            {
 0155                using var scope = _clientDiagnostics.CreateScope("DataFlowDebugSessionClient.QueryDataFlowDebugSessionsB
 0156                scope.Start();
 157                try
 158                {
 0159                    var response = RestClient.QueryDataFlowDebugSessionsByWorkspace(cancellationToken);
 0160                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 161                }
 0162                catch (Exception e)
 163                {
 0164                    scope.Failed(e);
 0165                    throw;
 166                }
 0167            }
 168            Page<DataFlowDebugSessionInfo> NextPageFunc(string nextLink, int? pageSizeHint)
 169            {
 0170                using var scope = _clientDiagnostics.CreateScope("DataFlowDebugSessionClient.QueryDataFlowDebugSessionsB
 0171                scope.Start();
 172                try
 173                {
 0174                    var response = RestClient.QueryDataFlowDebugSessionsByWorkspaceNextPage(nextLink, cancellationToken)
 0175                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 176                }
 0177                catch (Exception e)
 178                {
 0179                    scope.Failed(e);
 0180                    throw;
 181                }
 0182            }
 0183            return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
 184        }
 185
 186        /// <summary> Creates a data flow debug session. </summary>
 187        /// <param name="request"> Data flow debug session definition. </param>
 188        /// <param name="cancellationToken"> The cancellation token to use. </param>
 189        /// <exception cref="ArgumentNullException"> <paramref name="request"/> is null. </exception>
 190        public virtual async Task<DataFlowDebugSessionCreateDataFlowDebugSessionOperation> StartCreateDataFlowDebugSessi
 191        {
 0192            if (request == null)
 193            {
 0194                throw new ArgumentNullException(nameof(request));
 195            }
 196
 0197            using var scope = _clientDiagnostics.CreateScope("DataFlowDebugSessionClient.StartCreateDataFlowDebugSession
 0198            scope.Start();
 199            try
 200            {
 0201                var originalResponse = await RestClient.CreateDataFlowDebugSessionAsync(request, cancellationToken).Conf
 0202                return new DataFlowDebugSessionCreateDataFlowDebugSessionOperation(_clientDiagnostics, _pipeline, RestCl
 203            }
 0204            catch (Exception e)
 205            {
 0206                scope.Failed(e);
 0207                throw;
 208            }
 0209        }
 210
 211        /// <summary> Creates a data flow debug session. </summary>
 212        /// <param name="request"> Data flow debug session definition. </param>
 213        /// <param name="cancellationToken"> The cancellation token to use. </param>
 214        /// <exception cref="ArgumentNullException"> <paramref name="request"/> is null. </exception>
 215        public virtual DataFlowDebugSessionCreateDataFlowDebugSessionOperation StartCreateDataFlowDebugSession(CreateDat
 216        {
 0217            if (request == null)
 218            {
 0219                throw new ArgumentNullException(nameof(request));
 220            }
 221
 0222            using var scope = _clientDiagnostics.CreateScope("DataFlowDebugSessionClient.StartCreateDataFlowDebugSession
 0223            scope.Start();
 224            try
 225            {
 0226                var originalResponse = RestClient.CreateDataFlowDebugSession(request, cancellationToken);
 0227                return new DataFlowDebugSessionCreateDataFlowDebugSessionOperation(_clientDiagnostics, _pipeline, RestCl
 228            }
 0229            catch (Exception e)
 230            {
 0231                scope.Failed(e);
 0232                throw;
 233            }
 0234        }
 235
 236        /// <summary> Execute a data flow debug command. </summary>
 237        /// <param name="request"> Data flow debug command definition. </param>
 238        /// <param name="cancellationToken"> The cancellation token to use. </param>
 239        /// <exception cref="ArgumentNullException"> <paramref name="request"/> is null. </exception>
 240        public virtual async Task<DataFlowDebugSessionExecuteCommandOperation> StartExecuteCommandAsync(DataFlowDebugCom
 241        {
 0242            if (request == null)
 243            {
 0244                throw new ArgumentNullException(nameof(request));
 245            }
 246
 0247            using var scope = _clientDiagnostics.CreateScope("DataFlowDebugSessionClient.StartExecuteCommand");
 0248            scope.Start();
 249            try
 250            {
 0251                var originalResponse = await RestClient.ExecuteCommandAsync(request, cancellationToken).ConfigureAwait(f
 0252                return new DataFlowDebugSessionExecuteCommandOperation(_clientDiagnostics, _pipeline, RestClient.CreateE
 253            }
 0254            catch (Exception e)
 255            {
 0256                scope.Failed(e);
 0257                throw;
 258            }
 0259        }
 260
 261        /// <summary> Execute a data flow debug command. </summary>
 262        /// <param name="request"> Data flow debug command definition. </param>
 263        /// <param name="cancellationToken"> The cancellation token to use. </param>
 264        /// <exception cref="ArgumentNullException"> <paramref name="request"/> is null. </exception>
 265        public virtual DataFlowDebugSessionExecuteCommandOperation StartExecuteCommand(DataFlowDebugCommandRequest reque
 266        {
 0267            if (request == null)
 268            {
 0269                throw new ArgumentNullException(nameof(request));
 270            }
 271
 0272            using var scope = _clientDiagnostics.CreateScope("DataFlowDebugSessionClient.StartExecuteCommand");
 0273            scope.Start();
 274            try
 275            {
 0276                var originalResponse = RestClient.ExecuteCommand(request, cancellationToken);
 0277                return new DataFlowDebugSessionExecuteCommandOperation(_clientDiagnostics, _pipeline, RestClient.CreateE
 278            }
 0279            catch (Exception e)
 280            {
 0281                scope.Failed(e);
 0282                throw;
 283            }
 0284        }
 285    }
 286}