< Summary

Class:Azure.Core.TokenRequestContext
Assembly:Azure.Core
File(s):C:\Git\azure-sdk-for-net\sdk\core\Azure.Core\src\TokenRequestContext.cs
Covered lines:4
Uncovered lines:1
Coverable lines:5
Total lines:33
Line coverage:80% (4 of 5)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-100%100%
get_Scopes()-100%100%
get_ParentRequestId()-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\core\Azure.Core\src\TokenRequestContext.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4
 5namespace Azure.Core
 6{
 7    /// <summary>
 8    /// Contains the details of an authentication token request.
 9    /// </summary>
 10    public readonly struct TokenRequestContext
 11    {
 12        /// <summary>
 13        /// Creates a new TokenRequest with the specified scopes.
 14        /// </summary>
 15        /// <param name="scopes">The scopes required for the token.</param>
 16        /// <param name="parentRequestId">The <see cref="Request.ClientRequestId"/> of the request requiring a token for
 17        public TokenRequestContext(string[] scopes, string? parentRequestId = default)
 18        {
 12419            Scopes = scopes;
 12420            ParentRequestId = parentRequestId;
 12421        }
 22
 23        /// <summary>
 24        /// The scopes required for the token.
 25        /// </summary>
 1626        public string[] Scopes { get; }
 27
 28        /// <summary>
 29        /// The <see cref="Request.ClientRequestId"/> of the request requiring a token for authentication, if applicable
 30        /// </summary>
 031        public string? ParentRequestId { get; }
 32    }
 33}