Hyves.Service.Core.HyvesRequest.BeginInvokeMethod C# (CSharp) Method

BeginInvokeMethod() public method

Starts an asynchronous call to invoke the specified method.
public BeginInvokeMethod ( HyvesMethod method, AsyncCallback callback, object asyncState ) : IAsyncResult
method HyvesMethod The name of the API method to invoke.
callback AsyncCallback The async callback that is invoked when the request completes.
asyncState object The state to associate with the asynchronous call.
return IAsyncResult
    public IAsyncResult BeginInvokeMethod(HyvesMethod method, AsyncCallback callback, object asyncState)
    {
      if (this.asyncRequest != null)
      {
        throw new InvalidOperationException("A method is currently being invoked using this request.");
      }

      this.asyncMethod = method;
      this.asyncRequest = CreateRequest(method, this.session, parameters);
      return this.asyncRequest.BeginGetResponse(callback, asyncState);
    }