public async Task<ThreadFormResponse> SubmitAsync(IForumAccessToken token)
        {
            ThreadFormResponse response = null;
            this.WhileBusy(true);

            try
            {
                response = await submit(token);
                if (response.Success)
                {
                    this.OnSuccess();
                }
                else
                    this.OnFailure(new InvalidOperationException("post submit failed."));
            }
            catch (Exception ex) { this.OnFailure(ex); }
            finally { this.WhileBusy(false); }
            return response;
        }
 private Task<ThreadFormResponse> SubmitFormAsync(IForumAccessToken token)
 {
     if (form != null)
     {
         form.Message = this.message;
         return form.SubmitAsync(token);
     }
     else
     {
         return SubmitPostAsync(token);
     }
 }
 private Task<ThreadFormResponse> SubmitPostAsync(IForumAccessToken token)
 {
     return thread.ReplyAsync(this.message, token);
 }
Beispiel #4
0
 public AccessTokenMessage()
 {
     this.Token = null;
 }