Пример #1
0
 /// <summary>
 /// Creates a new topic on the current board.
 /// </summary>
 /// <param name="topicTitle">Title of the new topic, in wikitext format.</param>
 /// <param name="topicContent">First post content of the new topic, in wikitext format.</param>
 /// <param name="cancellationToken">The token used to cancel the operation.</param>
 /// <returns>
 /// A task that returns the newly-created topic when succeeds.
 /// The instance only contains the workflow ID, so you may need to call
 /// <see cref="Topic.RefreshAsync()"/> if you want to query more information about it.
 /// </returns>
 public Task <Topic> NewTopicAsync(string topicTitle, string topicContent, CancellationToken cancellationToken)
 {
     if (topicTitle == null)
     {
         throw new ArgumentNullException(nameof(topicTitle));
     }
     if (topicContent == null)
     {
         throw new ArgumentNullException(nameof(topicContent));
     }
     return(FlowRequestHelper.NewTopicAsync(Site, Title, topicTitle, topicContent, cancellationToken));
 }
Пример #2
0
 /// <summary>
 /// Add a new reply to the topic.
 /// </summary>
 /// <param name="content">The content in reply.</param>
 /// <param name="cancellationToken">A token used to cancel the operation.</param>
 /// <returns>A new post containing the workflow ID of the new post.</returns>
 public Task <Post> ReplyAsync(string content, CancellationToken cancellationToken)
 {
     return(FlowRequestHelper.ReplyAsync(Site, Title, WorkflowId, content, cancellationToken));
 }