Esempio n. 1
0
        public virtual bool Parse(string pageUrls)
        {
            bool result = true;

            string[] urls = UStr.Split(pageUrls, Environment.NewLine);

            foreach (string urlx in urls)
            {
                result = ParseUrl(urlx);
            }

            return(result);
        }
Esempio n. 2
0
        private StringBuilder FilterData(UserSession us)
        {
            string[] strs = UStr.Split(us.AsyncData.ToString(), "\0", StringSplitOptions.RemoveEmptyEntries);

            string str = "";
            int    i   = 0;

            us.AsyncData = new StringBuilder();
            bool isValid = true;

            if (strs.Length > 0)
            {
                str = strs[strs.Length - 1];
                if (!UData.IsValidXml(str))
                {
                    us.AsyncData.Append(str);
                    isValid = false;
                }

                if (isValid)
                {
                    for (i = 0; i < strs.Length; i++)
                    {
                        str = strs[i];
                        ProcessData(str, us);
                    }
                }
                else
                {
                    for (i = 0; i < strs.Length - 1; i++)
                    {
                        str = strs[i];
                        ProcessData(str, us);
                    }
                }
            }

            return(us.AsyncData);
        }
Esempio n. 3
0
        public static int LineCount(string text)
        {
            string [] lines = UStr.Split(text, Environment.NewLine);

            return(lines.Length);
        }