< Summary

Class:Microsoft.Azure.Graph.RBAC.DomainsOperationsExtensions
Assembly:Microsoft.Azure.Graph.RBAC
File(s):C:\Git\azure-sdk-for-net\sdk\graphrbac\Microsoft.Azure.Graph.RBAC\src\Generated\DomainsOperationsExtensions.cs
Covered lines:0
Uncovered lines:8
Coverable lines:8
Total lines:96
Line coverage:0% (0 of 8)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
List(...)-0%100%
ListAsync()-0%100%
Get(...)-0%100%
GetAsync()-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\graphrbac\Microsoft.Azure.Graph.RBAC\src\Generated\DomainsOperationsExtensions.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.Graph.RBAC
 12{
 13    using Microsoft.Rest;
 14    using Microsoft.Rest.Azure;
 15    using Microsoft.Rest.Azure.OData;
 16    using Models;
 17    using System.Collections;
 18    using System.Collections.Generic;
 19    using System.Threading;
 20    using System.Threading.Tasks;
 21
 22    /// <summary>
 23    /// Extension methods for DomainsOperations.
 24    /// </summary>
 25    public static partial class DomainsOperationsExtensions
 26    {
 27            /// <summary>
 28            /// Gets a list of domains for the current tenant.
 29            /// </summary>
 30            /// <param name='operations'>
 31            /// The operations group for this extension method.
 32            /// </param>
 33            /// <param name='odataQuery'>
 34            /// OData parameters to apply to the operation.
 35            /// </param>
 36            public static IEnumerable<Domain> List(this IDomainsOperations operations, ODataQuery<User> odataQuery = def
 37            {
 038                return operations.ListAsync(odataQuery).GetAwaiter().GetResult();
 39            }
 40
 41            /// <summary>
 42            /// Gets a list of domains for the current tenant.
 43            /// </summary>
 44            /// <param name='operations'>
 45            /// The operations group for this extension method.
 46            /// </param>
 47            /// <param name='odataQuery'>
 48            /// OData parameters to apply to the operation.
 49            /// </param>
 50            /// <param name='cancellationToken'>
 51            /// The cancellation token.
 52            /// </param>
 53            public static async Task<IEnumerable<Domain>> ListAsync(this IDomainsOperations operations, ODataQuery<User>
 54            {
 055                using (var _result = await operations.ListWithHttpMessagesAsync(odataQuery, null, cancellationToken).Con
 56                {
 057                    return _result.Body;
 58                }
 059            }
 60
 61            /// <summary>
 62            /// Gets a specific domain in the current tenant.
 63            /// </summary>
 64            /// <param name='operations'>
 65            /// The operations group for this extension method.
 66            /// </param>
 67            /// <param name='domainName'>
 68            /// name of the domain.
 69            /// </param>
 70            public static Domain Get(this IDomainsOperations operations, string domainName)
 71            {
 072                return operations.GetAsync(domainName).GetAwaiter().GetResult();
 73            }
 74
 75            /// <summary>
 76            /// Gets a specific domain in the current tenant.
 77            /// </summary>
 78            /// <param name='operations'>
 79            /// The operations group for this extension method.
 80            /// </param>
 81            /// <param name='domainName'>
 82            /// name of the domain.
 83            /// </param>
 84            /// <param name='cancellationToken'>
 85            /// The cancellation token.
 86            /// </param>
 87            public static async Task<Domain> GetAsync(this IDomainsOperations operations, string domainName, Cancellatio
 88            {
 089                using (var _result = await operations.GetWithHttpMessagesAsync(domainName, null, cancellationToken).Conf
 90                {
 091                    return _result.Body;
 92                }
 093            }
 94
 95    }
 96}