Ejemplo n.º 1
0
        /// <summary>
        /// Add reaction to the last comment
        /// </summary>
        /// <param name="teamProjectName"></param>
        /// <param name="workItemID"></param>
        /// <param name="reactionType"></param>
        private static void AddReactionToLastComment(string teamProjectName, int workItemID, CommentReactionType reactionType)
        {
            CommentList comments = WitClient.GetCommentsAsync(teamProjectName, workItemID).Result;

            var reaction = WitClient.CreateCommentReactionAsync(teamProjectName, workItemID, comments.Comments.ElementAt(0).Id, reactionType).Result;

            Console.WriteLine("{0} - {1}\n", reaction.Type, reaction.Count);
        }