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

BeginCreateRequestToken() public method

Starts an asynchronous call to create an authorization token. This corresponds to the Hyves auth.createToken method.
public BeginCreateRequestToken ( HyvesExpirationType expirationType, AsyncCallback callback, object asyncState ) : IAsyncResult
expirationType HyvesExpirationType
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 BeginCreateRequestToken(HyvesExpirationType expirationType, AsyncCallback callback, object asyncState)
    {
      if (this.asyncRequest != null)
      {
        throw new InvalidOperationException("A method is currently being invoked using this request.");
      }

      this.asyncRequest = CreateRequest(null, null, expirationType, this.session);
      return this.asyncRequest.BeginGetResponse(callback, asyncState);
    }