| | 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 | |
|
| | 11 | | namespace 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 | | { |
| 0 | 38 | | 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 | | { |
| 0 | 55 | | using (var _result = await operations.ListWithHttpMessagesAsync(odataQuery, null, cancellationToken).Con |
| | 56 | | { |
| 0 | 57 | | return _result.Body; |
| | 58 | | } |
| 0 | 59 | | } |
| | 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 | | { |
| 0 | 72 | | 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 | | { |
| 0 | 89 | | using (var _result = await operations.GetWithHttpMessagesAsync(domainName, null, cancellationToken).Conf |
| | 90 | | { |
| 0 | 91 | | return _result.Body; |
| | 92 | | } |
| 0 | 93 | | } |
| | 94 | |
|
| | 95 | | } |
| | 96 | | } |