Exemple #1
0
        /// <summary>
        /// called by Match2Item only
        /// </summary>
        /// <param name="m"></param>
        /// <param name="PreItemCount"></param>
        public static void Match2ItemCount(Match m, List <ViewData> PreItemCount = null)
        {
            if (!m.Groups["View"].Success && !m.Groups["Reply"].Success && !m.Groups["Forward"].Success)
            {
                return;
            }

            ViewData ItemCount = new ViewData();

            ItemCount.FetchTime = DateTime.Now;
            ItemCount.View      = RegexUtility.TryGetInt(m, "View", 0);
            ItemCount.Reply     = RegexUtility.TryGetInt(m, "Reply", 0);
            ItemCount.Forward   = RegexUtility.TryGetInt(m, "Forward", 0);

            if (PreItemCount == null)
            {
                PreItemCount = new List <ViewData>();
            }

            PreItemCount.Add((ItemCount));
        }