/// <summary> /// Updates a comment's message /// </summary> /// <param name="onSuccess">Action to perform with the updated comment</param> /// <param name="onFailure">Action to perform following a failed Comment operation</param> /// <param name="comment">The comment to update</param> /// <param name="fields">The properties that should be set on the returned Comment. Type and Id are always set. If left null, all properties will be set, which can increase response time.</param> public void Update(Action<Comment> onSuccess, Action<Error> onFailure, Comment comment, IEnumerable<CommentField> fields = null) { GuardFromNull(comment, "comment"); UpdateComment(onSuccess, onFailure, comment.Id, comment.Message, fields); }
/// <summary> /// Updates a comment's message /// </summary> /// <param name="comment">The comment to update</param> /// <param name="fields">The properties that should be set on the returned Comment. Type and Id are always set. If left null, all properties will be set, which can increase response time.</param> /// <returns>The updated comment</returns> public Comment Update(Comment comment, IEnumerable<CommentField> fields = null) { GuardFromNull(comment, "comment"); return UpdateComment(comment.Id, comment.Message, fields); }
/// <summary> /// Deletes a comment /// </summary> /// <param name="onSuccess">Action to perform following a successful delete</param> /// <param name="onFailure">Action to perform following a failed Comment operation</param> /// <param name="comment">The comment to delete</param> public void Delete(Action<IRestResponse> onSuccess, Action<Error> onFailure, Comment comment) { GuardFromNull(comment, "comment"); DeleteComment(onSuccess, onFailure, comment.Id); }
/// <summary> /// Retrieves a comment /// </summary> /// <param name="comment">The comment to retrieve</param> /// <param name="fields">The properties that should be set on the returned Comment. Type and Id are always set. If left null, all properties will be set, which can increase response time.</param> /// <returns>The retrieved comment</returns> public Comment GetComment(Comment comment, IEnumerable<CommentField> fields = null) { GuardFromNull(comment, "comment"); return GetComment(comment.Id, fields); }
/// <summary> /// Deletes a comment /// </summary> /// <param name="comment">The comment to delete</param> public void Delete(Comment comment) { GuardFromNull(comment, "comment"); DeleteComment(comment.Id); }