< Summary

Class:Microsoft.Azure.ContainerRegistry.RepositoryOperationsExtensions
Assembly:Microsoft.Azure.ContainerRegistry
File(s):C:\Git\azure-sdk-for-net\sdk\containerregistry\Microsoft.Azure.ContainerRegistry\src\Generated\RepositoryOperationsExtensions.cs
Covered lines:11
Uncovered lines:0
Coverable lines:11
Total lines:110
Line coverage:100% (11 of 11)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
GetListAsync()-100%100%
GetAttributesAsync()-100%100%
DeleteAsync()-100%100%
UpdateAttributesAsync()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\containerregistry\Microsoft.Azure.ContainerRegistry\src\Generated\RepositoryOperationsExtensions.cs

#LineLine coverage
 1// <auto-generated>
 2// Copyright (c) Microsoft Corporation. All rights reserved.
 3// Licensed under the MIT License. See License.txt in the project root for
 4// license information.
 5//
 6// Code generated by Microsoft (R) AutoRest Code Generator.
 7// Changes may cause incorrect behavior and will be lost if the code is
 8// regenerated.
 9// </auto-generated>
 10
 11namespace Microsoft.Azure.ContainerRegistry
 12{
 13    using Microsoft.Rest;
 14    using Microsoft.Rest.Azure;
 15    using Models;
 16    using System.Threading;
 17    using System.Threading.Tasks;
 18
 19    /// <summary>
 20    /// Extension methods for RepositoryOperations.
 21    /// </summary>
 22    public static partial class RepositoryOperationsExtensions
 23    {
 24            /// <summary>
 25            /// List repositories
 26            /// </summary>
 27            /// <param name='operations'>
 28            /// The operations group for this extension method.
 29            /// </param>
 30            /// <param name='last'>
 31            /// Query parameter for the last item in previous query. Result set will
 32            /// include values lexically after last.
 33            /// </param>
 34            /// <param name='n'>
 35            /// query parameter for max number of items
 36            /// </param>
 37            /// <param name='cancellationToken'>
 38            /// The cancellation token.
 39            /// </param>
 40            public static async Task<Repositories> GetListAsync(this IRepositoryOperations operations, string last = def
 41            {
 642                using (var _result = await operations.GetListWithHttpMessagesAsync(last, n, null, cancellationToken).Con
 43                {
 644                    return _result.Body;
 45                }
 646            }
 47
 48            /// <summary>
 49            /// Get repository attributes
 50            /// </summary>
 51            /// <param name='operations'>
 52            /// The operations group for this extension method.
 53            /// </param>
 54            /// <param name='name'>
 55            /// Name of the image (including the namespace)
 56            /// </param>
 57            /// <param name='cancellationToken'>
 58            /// The cancellation token.
 59            /// </param>
 60            public static async Task<RepositoryAttributes> GetAttributesAsync(this IRepositoryOperations operations, str
 61            {
 462                using (var _result = await operations.GetAttributesWithHttpMessagesAsync(name, null, cancellationToken).
 63                {
 464                    return _result.Body;
 65                }
 466            }
 67
 68            /// <summary>
 69            /// Delete the repository identified by `name`
 70            /// </summary>
 71            /// <param name='operations'>
 72            /// The operations group for this extension method.
 73            /// </param>
 74            /// <param name='name'>
 75            /// Name of the image (including the namespace)
 76            /// </param>
 77            /// <param name='cancellationToken'>
 78            /// The cancellation token.
 79            /// </param>
 80            public static async Task<DeletedRepository> DeleteAsync(this IRepositoryOperations operations, string name, 
 81            {
 282                using (var _result = await operations.DeleteWithHttpMessagesAsync(name, null, cancellationToken).Configu
 83                {
 284                    return _result.Body;
 85                }
 286            }
 87
 88            /// <summary>
 89            /// Update the attribute identified by `name` where `reference` is the name of
 90            /// the repository.
 91            /// </summary>
 92            /// <param name='operations'>
 93            /// The operations group for this extension method.
 94            /// </param>
 95            /// <param name='name'>
 96            /// Name of the image (including the namespace)
 97            /// </param>
 98            /// <param name='value'>
 99            /// Repository attribute value
 100            /// </param>
 101            /// <param name='cancellationToken'>
 102            /// The cancellation token.
 103            /// </param>
 104            public static async Task UpdateAttributesAsync(this IRepositoryOperations operations, string name, Changeabl
 105            {
 4106                (await operations.UpdateAttributesWithHttpMessagesAsync(name, value, null, cancellationToken).ConfigureA
 4107            }
 108
 109    }
 110}