Amazon.IdentityManagement.AmazonIdentityManagementServiceClient.ListGroupsForUserAsync C# (CSharp) Method

ListGroupsForUserAsync() public method

Initiates the asynchronous execution of the ListGroupsForUser operation.
public ListGroupsForUserAsync ( ListGroupsForUserRequest request, ListGroupsForUserResponse>.AmazonServiceCallback callback, AsyncOptions options = null ) : void
request ListGroupsForUserRequest Container for the necessary parameters to execute the ListGroupsForUser operation on AmazonIdentityManagementServiceClient.
callback ListGroupsForUserResponse>.AmazonServiceCallback An Action delegate that is invoked when the operation completes.
options AsyncOptions A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
return void
        public void ListGroupsForUserAsync(ListGroupsForUserRequest request, AmazonServiceCallback<ListGroupsForUserRequest, ListGroupsForUserResponse> callback, AsyncOptions options = null)
        {
            options = options == null?new AsyncOptions():options;
            var marshaller = new ListGroupsForUserRequestMarshaller();
            var unmarshaller = ListGroupsForUserResponseUnmarshaller.Instance;
            Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;
            if(callback !=null )
                callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { 
                    AmazonServiceResult<ListGroupsForUserRequest,ListGroupsForUserResponse> responseObject 
                            = new AmazonServiceResult<ListGroupsForUserRequest,ListGroupsForUserResponse>((ListGroupsForUserRequest)req, (ListGroupsForUserResponse)res, ex , ao.State);    
                        callback(responseObject); 
                };
            BeginInvoke<ListGroupsForUserRequest>(request, marshaller, unmarshaller, options, callbackHelper);
        }

Same methods

AmazonIdentityManagementServiceClient::ListGroupsForUserAsync ( ListGroupsForUserRequest request, System cancellationToken = default(CancellationToken) ) : Task
AmazonIdentityManagementServiceClient