< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
GetFromExchangeAsync()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\containerregistry\Microsoft.Azure.ContainerRegistry\src\Generated\RefreshTokensOperationsExtensions.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 RefreshTokensOperations.
 21    /// </summary>
 22    public static partial class RefreshTokensOperationsExtensions
 23    {
 24            /// <summary>
 25            /// Exchange AAD tokens for an ACR refresh Token
 26            /// </summary>
 27            /// <param name='operations'>
 28            /// The operations group for this extension method.
 29            /// </param>
 30            /// <param name='grantType'>
 31            /// Can take a value of access_token_refresh_token, or access_token, or
 32            /// refresh_token. Possible values include: 'access_token_refresh_token',
 33            /// 'access_token', 'refresh_token'
 34            /// </param>
 35            /// <param name='service'>
 36            /// Indicates the name of your Azure container registry.
 37            /// </param>
 38            /// <param name='tenant'>
 39            /// AAD tenant associated to the AAD credentials.
 40            /// </param>
 41            /// <param name='refreshToken'>
 42            /// AAD refresh token, mandatory when grant_type is access_token_refresh_token
 43            /// or refresh_token
 44            /// </param>
 45            /// <param name='accessToken'>
 46            /// AAD access token, mandatory when grant_type is access_token_refresh_token
 47            /// or access_token.
 48            /// </param>
 49            /// <param name='cancellationToken'>
 50            /// The cancellation token.
 51            /// </param>
 52            public static async Task<RefreshToken> GetFromExchangeAsync(this IRefreshTokensOperations operations, string
 53            {
 454                using (var _result = await operations.GetFromExchangeWithHttpMessagesAsync(grantType, service, tenant, r
 55                {
 456                    return _result.Body;
 57                }
 458            }
 59
 60    }
 61}

Methods/Properties

GetFromExchangeAsync()