< Summary

Class:Azure.ResourceManager.Compute.VirtualMachineExtensionImagesOperations
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\VirtualMachineExtensionImagesOperations.cs
Covered lines:32
Uncovered lines:18
Coverable lines:50
Total lines:166
Line coverage:64% (32 of 50)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_RestClient()-100%100%
.ctor()-100%100%
.ctor(...)-100%100%
GetAsync()-57.14%100%
Get(...)-57.14%100%
ListTypesAsync()-57.14%100%
ListTypes(...)-57.14%100%
ListVersionsAsync()-57.14%100%
ListVersions(...)-57.14%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\VirtualMachineExtensionImagesOperations.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.Collections.Generic;
 10using System.Threading;
 11using System.Threading.Tasks;
 12using Azure;
 13using Azure.Core.Pipeline;
 14using Azure.ResourceManager.Compute.Models;
 15
 16namespace Azure.ResourceManager.Compute
 17{
 18    /// <summary> The VirtualMachineExtensionImages service client. </summary>
 19    public partial class VirtualMachineExtensionImagesOperations
 20    {
 21        private readonly ClientDiagnostics _clientDiagnostics;
 22        private readonly HttpPipeline _pipeline;
 1223        internal VirtualMachineExtensionImagesRestOperations RestClient { get; }
 24        /// <summary> Initializes a new instance of VirtualMachineExtensionImagesOperations for mocking. </summary>
 39625        protected VirtualMachineExtensionImagesOperations()
 26        {
 39627        }
 28        /// <summary> Initializes a new instance of VirtualMachineExtensionImagesOperations. </summary>
 29        /// <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="subscriptionId"> Subscription credentials which uniquely identify Microsoft Azure subscription.
 32        /// <param name="endpoint"> server parameter. </param>
 39633        internal VirtualMachineExtensionImagesOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, str
 34        {
 39635            RestClient = new VirtualMachineExtensionImagesRestOperations(clientDiagnostics, pipeline, subscriptionId, en
 39636            _clientDiagnostics = clientDiagnostics;
 39637            _pipeline = pipeline;
 39638        }
 39
 40        /// <summary> Gets a virtual machine extension image. </summary>
 41        /// <param name="location"> The name of a supported Azure region. </param>
 42        /// <param name="publisherName"> The String to use. </param>
 43        /// <param name="type"> The String to use. </param>
 44        /// <param name="version"> The String to use. </param>
 45        /// <param name="cancellationToken"> The cancellation token to use. </param>
 46        public virtual async Task<Response<VirtualMachineExtensionImage>> GetAsync(string location, string publisherName
 47        {
 248            using var scope = _clientDiagnostics.CreateScope("VirtualMachineExtensionImagesOperations.Get");
 249            scope.Start();
 50            try
 51            {
 252                return await RestClient.GetAsync(location, publisherName, type, version, cancellationToken).ConfigureAwa
 53            }
 054            catch (Exception e)
 55            {
 056                scope.Failed(e);
 057                throw;
 58            }
 259        }
 60
 61        /// <summary> Gets a virtual machine extension image. </summary>
 62        /// <param name="location"> The name of a supported Azure region. </param>
 63        /// <param name="publisherName"> The String to use. </param>
 64        /// <param name="type"> The String to use. </param>
 65        /// <param name="version"> The String to use. </param>
 66        /// <param name="cancellationToken"> The cancellation token to use. </param>
 67        public virtual Response<VirtualMachineExtensionImage> Get(string location, string publisherName, string type, st
 68        {
 269            using var scope = _clientDiagnostics.CreateScope("VirtualMachineExtensionImagesOperations.Get");
 270            scope.Start();
 71            try
 72            {
 273                return RestClient.Get(location, publisherName, type, version, cancellationToken);
 74            }
 075            catch (Exception e)
 76            {
 077                scope.Failed(e);
 078                throw;
 79            }
 280        }
 81
 82        /// <summary> Gets a list of virtual machine extension image types. </summary>
 83        /// <param name="location"> The name of a supported Azure region. </param>
 84        /// <param name="publisherName"> The String to use. </param>
 85        /// <param name="cancellationToken"> The cancellation token to use. </param>
 86        public virtual async Task<Response<IReadOnlyList<VirtualMachineExtensionImage>>> ListTypesAsync(string location,
 87        {
 288            using var scope = _clientDiagnostics.CreateScope("VirtualMachineExtensionImagesOperations.ListTypes");
 289            scope.Start();
 90            try
 91            {
 292                return await RestClient.ListTypesAsync(location, publisherName, cancellationToken).ConfigureAwait(false)
 93            }
 094            catch (Exception e)
 95            {
 096                scope.Failed(e);
 097                throw;
 98            }
 299        }
 100
 101        /// <summary> Gets a list of virtual machine extension image types. </summary>
 102        /// <param name="location"> The name of a supported Azure region. </param>
 103        /// <param name="publisherName"> The String to use. </param>
 104        /// <param name="cancellationToken"> The cancellation token to use. </param>
 105        public virtual Response<IReadOnlyList<VirtualMachineExtensionImage>> ListTypes(string location, string publisher
 106        {
 2107            using var scope = _clientDiagnostics.CreateScope("VirtualMachineExtensionImagesOperations.ListTypes");
 2108            scope.Start();
 109            try
 110            {
 2111                return RestClient.ListTypes(location, publisherName, cancellationToken);
 112            }
 0113            catch (Exception e)
 114            {
 0115                scope.Failed(e);
 0116                throw;
 117            }
 2118        }
 119
 120        /// <summary> Gets a list of virtual machine extension image versions. </summary>
 121        /// <param name="location"> The name of a supported Azure region. </param>
 122        /// <param name="publisherName"> The String to use. </param>
 123        /// <param name="type"> The String to use. </param>
 124        /// <param name="filter"> The filter to apply on the operation. </param>
 125        /// <param name="top"> The Integer to use. </param>
 126        /// <param name="orderby"> The String to use. </param>
 127        /// <param name="cancellationToken"> The cancellation token to use. </param>
 128        public virtual async Task<Response<IReadOnlyList<VirtualMachineExtensionImage>>> ListVersionsAsync(string locati
 129        {
 2130            using var scope = _clientDiagnostics.CreateScope("VirtualMachineExtensionImagesOperations.ListVersions");
 2131            scope.Start();
 132            try
 133            {
 2134                return await RestClient.ListVersionsAsync(location, publisherName, type, filter, top, orderby, cancellat
 135            }
 0136            catch (Exception e)
 137            {
 0138                scope.Failed(e);
 0139                throw;
 140            }
 2141        }
 142
 143        /// <summary> Gets a list of virtual machine extension image versions. </summary>
 144        /// <param name="location"> The name of a supported Azure region. </param>
 145        /// <param name="publisherName"> The String to use. </param>
 146        /// <param name="type"> The String to use. </param>
 147        /// <param name="filter"> The filter to apply on the operation. </param>
 148        /// <param name="top"> The Integer to use. </param>
 149        /// <param name="orderby"> The String to use. </param>
 150        /// <param name="cancellationToken"> The cancellation token to use. </param>
 151        public virtual Response<IReadOnlyList<VirtualMachineExtensionImage>> ListVersions(string location, string publis
 152        {
 2153            using var scope = _clientDiagnostics.CreateScope("VirtualMachineExtensionImagesOperations.ListVersions");
 2154            scope.Start();
 155            try
 156            {
 2157                return RestClient.ListVersions(location, publisherName, type, filter, top, orderby, cancellationToken);
 158            }
 0159            catch (Exception e)
 160            {
 0161                scope.Failed(e);
 0162                throw;
 163            }
 2164        }
 165    }
 166}