private async Task HandleComment()

in Facebook/FacebookSDK/JobProcessorFB.cs [125:151]


        private async Task HandleComment(CommentDataFB comment, AuthenticationHeaderValue header, string pageId, Item postItem, ConnectorTask taskInfo, List<ItemMetadata> itemMetadata)
        {
            Item commentItem = await CreateCommentItem(comment, pageId, postItem, taskInfo, itemMetadata);
            commentItem.PreContext = null;

            if (comment.CommentCount > 0)
            {
                bool moreReplies = false;

                do
                {
                    if (moreReplies)
                    {
                        // only if there are more replies to this comment, to be fetched
                        comment.Comments = await this.downloader.GetWebContent<CommentFB, ErrorsFB>(comment.Comments.Paging.Next, header);
                    }
                    if (comment.Comments?.Data != null)
                    {
                        foreach (CommentDataFB reply in comment.Comments.Data)
                        {
                            await HandleReply(reply, pageId, commentItem, postItem, taskInfo, itemMetadata);
                        }
                        moreReplies = true;
                    }
                } while (comment.Comments?.Paging?.Next != null);
            }
        }