private YouTubeLiveMessageMetadata CreateMetadata(IYouTubeLiveMessage message, bool isInitialComment)
        {
            string userId = null;

            if (message is IYouTubeLiveComment comment)
            {
                userId = comment.UserId;
            }
            else if (message is IYouTubeLiveSuperchat superchat)
            {
                userId = superchat.UserId;
            }
            bool  isFirstComment;
            IUser user;

            if (userId != null)
            {
                if (_userCommentCountDict.ContainsKey(userId))
                {
                    _userCommentCountDict[userId]++;
                    isFirstComment = false;
                }
                else
                {
                    _userCommentCountDict.Add(userId, 1);
                    isFirstComment = true;
                }
                user = GetUser(userId);
            }
            else
            {
                isFirstComment = false;
                user           = null;
            }
            var metadata = new YouTubeLiveMessageMetadata(message, _options, _siteOptions, user, _cp, isFirstComment)
            {
                IsInitialComment = isInitialComment,
                SiteContextGuid  = SiteContextGuid,
            };

            return(metadata);
        }
 public YouTubeLiveMessageContext(IYouTubeLiveMessage message, YouTubeLiveMessageMetadata metadata, IMessageMethods methods)
 {
     Message  = message;
     Metadata = metadata;
     Methods  = methods;
 }