public virtual Pageable <string> GetMemberGroups(string objectId, GroupGetMemberGroupsParameters parameters, CancellationToken cancellationToken = default) { if (objectId == null) { throw new ArgumentNullException(nameof(objectId)); } if (parameters == null) { throw new ArgumentNullException(nameof(parameters)); } Page <string> FirstPageFunc(int?pageSizeHint) { using var scope = _clientDiagnostics.CreateScope("GroupsOperations.GetMemberGroups"); scope.Start(); try { var response = RestClient.GetMemberGroups(objectId, parameters, cancellationToken); return(Page.FromValues(response.Value.Value, null, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } return(PageableHelpers.CreateEnumerable(FirstPageFunc, null)); }
/// <summary> /// Gets a collection of object IDs of groups of which the specified group is a /// member. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='objectId'> /// The object ID of the group for which to get group membership. /// </param> /// <param name='parameters'> /// Group filtering parameters. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IEnumerable <string> > GetMemberGroupsAsync(this IGroupsOperations operations, string objectId, GroupGetMemberGroupsParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetMemberGroupsWithHttpMessagesAsync(objectId, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets a collection of object IDs of groups of which the specified group is a /// member. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='objectId'> /// The object ID of the group for which to get group membership. /// </param> /// <param name='parameters'> /// Group filtering parameters. /// </param> public static IEnumerable <string> GetMemberGroups(this IGroupsOperations operations, string objectId, GroupGetMemberGroupsParameters parameters) { return(operations.GetMemberGroupsAsync(objectId, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Gets a collection that contains the Object IDs of the groups of which the /// group is a member. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='objectId'> /// Group filtering parameters. /// </param> /// <param name='parameters'> /// Group filtering parameters. /// </param> public static IEnumerable <string> GetMemberGroups(this IGroupsOperations operations, string objectId, GroupGetMemberGroupsParameters parameters) { return(Task.Factory.StartNew(s => ((IGroupsOperations)s).GetMemberGroupsAsync(objectId, parameters), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Gets a collection that contains the Object IDs of the groups of /// which the group is a member. /// </summary> /// <param name='operations'> /// Reference to the Microsoft.Azure.Graph.RBAC.IGroupOperations. /// </param> /// <param name='parameters'> /// Required. Group filtering parameters. /// </param> /// <returns> /// Server response for GetMemberGroups API call /// </returns> public static Task <GroupGetMemberGroupsResult> GetMemberGroupsAsync(this IGroupOperations operations, GroupGetMemberGroupsParameters parameters) { return(operations.GetMemberGroupsAsync(parameters, CancellationToken.None)); }
/// <summary> /// Gets a collection that contains the Object IDs of the groups of /// which the group is a member. /// </summary> /// <param name='operations'> /// Reference to the Microsoft.Azure.Graph.RBAC.IGroupOperations. /// </param> /// <param name='parameters'> /// Required. Group filtering parameters. /// </param> /// <returns> /// Server response for GetMemberGroups API call /// </returns> public static GroupGetMemberGroupsResult GetMemberGroups(this IGroupOperations operations, GroupGetMemberGroupsParameters parameters) { return(Task.Factory.StartNew((object s) => { return ((IGroupOperations)s).GetMemberGroupsAsync(parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }