| | 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 Models; |
| | 16 | | using System.Threading; |
| | 17 | | using System.Threading.Tasks; |
| | 18 | |
|
| | 19 | | /// <summary> |
| | 20 | | /// Extension methods for SignedInUserOperations. |
| | 21 | | /// </summary> |
| | 22 | | public static partial class SignedInUserOperationsExtensions |
| | 23 | | { |
| | 24 | | /// <summary> |
| | 25 | | /// Gets the details for the currently logged-in user. |
| | 26 | | /// </summary> |
| | 27 | | /// <param name='operations'> |
| | 28 | | /// The operations group for this extension method. |
| | 29 | | /// </param> |
| | 30 | | public static User Get(this ISignedInUserOperations operations) |
| | 31 | | { |
| 0 | 32 | | return operations.GetAsync().GetAwaiter().GetResult(); |
| | 33 | | } |
| | 34 | |
|
| | 35 | | /// <summary> |
| | 36 | | /// Gets the details for the currently logged-in user. |
| | 37 | | /// </summary> |
| | 38 | | /// <param name='operations'> |
| | 39 | | /// The operations group for this extension method. |
| | 40 | | /// </param> |
| | 41 | | /// <param name='cancellationToken'> |
| | 42 | | /// The cancellation token. |
| | 43 | | /// </param> |
| | 44 | | public static async Task<User> GetAsync(this ISignedInUserOperations operations, CancellationToken cancellat |
| | 45 | | { |
| 0 | 46 | | using (var _result = await operations.GetWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(f |
| | 47 | | { |
| 0 | 48 | | return _result.Body; |
| | 49 | | } |
| 0 | 50 | | } |
| | 51 | |
|
| | 52 | | /// <summary> |
| | 53 | | /// Get the list of directory objects that are owned by the user. |
| | 54 | | /// </summary> |
| | 55 | | /// <param name='operations'> |
| | 56 | | /// The operations group for this extension method. |
| | 57 | | /// </param> |
| | 58 | | public static IPage<DirectoryObject> ListOwnedObjects(this ISignedInUserOperations operations) |
| | 59 | | { |
| 0 | 60 | | return operations.ListOwnedObjectsAsync().GetAwaiter().GetResult(); |
| | 61 | | } |
| | 62 | |
|
| | 63 | | /// <summary> |
| | 64 | | /// Get the list of directory objects that are owned by the user. |
| | 65 | | /// </summary> |
| | 66 | | /// <param name='operations'> |
| | 67 | | /// The operations group for this extension method. |
| | 68 | | /// </param> |
| | 69 | | /// <param name='cancellationToken'> |
| | 70 | | /// The cancellation token. |
| | 71 | | /// </param> |
| | 72 | | public static async Task<IPage<DirectoryObject>> ListOwnedObjectsAsync(this ISignedInUserOperations operatio |
| | 73 | | { |
| 0 | 74 | | using (var _result = await operations.ListOwnedObjectsWithHttpMessagesAsync(null, cancellationToken).Con |
| | 75 | | { |
| 0 | 76 | | return _result.Body; |
| | 77 | | } |
| 0 | 78 | | } |
| | 79 | |
|
| | 80 | | /// <summary> |
| | 81 | | /// Get the list of directory objects that are owned by the user. |
| | 82 | | /// </summary> |
| | 83 | | /// <param name='operations'> |
| | 84 | | /// The operations group for this extension method. |
| | 85 | | /// </param> |
| | 86 | | /// <param name='nextLink'> |
| | 87 | | /// Next link for the list operation. |
| | 88 | | /// </param> |
| | 89 | | public static IPage<DirectoryObject> ListOwnedObjectsNext(this ISignedInUserOperations operations, string ne |
| | 90 | | { |
| 0 | 91 | | return operations.ListOwnedObjectsNextAsync(nextLink).GetAwaiter().GetResult(); |
| | 92 | | } |
| | 93 | |
|
| | 94 | | /// <summary> |
| | 95 | | /// Get the list of directory objects that are owned by the user. |
| | 96 | | /// </summary> |
| | 97 | | /// <param name='operations'> |
| | 98 | | /// The operations group for this extension method. |
| | 99 | | /// </param> |
| | 100 | | /// <param name='nextLink'> |
| | 101 | | /// Next link for the list operation. |
| | 102 | | /// </param> |
| | 103 | | /// <param name='cancellationToken'> |
| | 104 | | /// The cancellation token. |
| | 105 | | /// </param> |
| | 106 | | public static async Task<IPage<DirectoryObject>> ListOwnedObjectsNextAsync(this ISignedInUserOperations oper |
| | 107 | | { |
| 0 | 108 | | using (var _result = await operations.ListOwnedObjectsNextWithHttpMessagesAsync(nextLink, null, cancella |
| | 109 | | { |
| 0 | 110 | | return _result.Body; |
| | 111 | | } |
| 0 | 112 | | } |
| | 113 | |
|
| | 114 | | } |
| | 115 | | } |