/// <summary> /// Adds a new comment to a node and returns the cid. /// </summary> /// <param name="comment">An object as would be returned from comment_load().</param> /// <returns>Unique identifier for the comment (cid) or errors if there was a problem.</returns> public DrupalCommentCid CommentCreate(object comment) { this.InitRequest(); DrupalCommentCid res = default(DrupalCommentCid); try { res = drupalServiceSystem.CommentCreate(ConvertAs(comment)); } catch (Exception ex) { this.HandleException(ex, "CommentCreate"); } return(res); }
void OnCommentCreateCompleted(IAsyncResult asyncResult) { if (this.CommentCreateCompleted != null) { var clientResult = (XmlRpcAsyncResult)asyncResult; DrupalCommentCid result = default(DrupalCommentCid); try { result = ((IServiceSystem)clientResult.ClientProtocol).EndCommentCreate(asyncResult); this.CommentCreateCompleted(this, new DrupalAsyncCompletedEventArgs <DrupalCommentCid>(result, null, asyncResult.AsyncState)); } catch (Exception ex) { this.CommentCreateCompleted(this, new DrupalAsyncCompletedEventArgs <DrupalCommentCid>(result, ex, asyncResult.AsyncState)); } } }