isPattern() публичный Метод

public isPattern ( ) : bool
Результат bool
Пример #1
0
        private void setDictionary(ArrayList arr)
        {
            list.Clear();
            titleList.Clear();
            patternList.Clear();

            foreach (string temp in arr)
            {
                if (string.IsNullOrEmpty(temp))
                {
                    break;
                }
                if (temp.Trim().IndexOf(Util.DELIMITER_INFO) == 0)
                {
                    titleList.Add(temp.Trim());
                    continue;
                }

                HostItem it = new HostItem(temp.Trim().Split(','));

                if (it.error == 0)
                {
                    list[it.Before] = it;

                    if (it.isPattern())
                    {
                        patternList[it.Before] = it.After;
                    }
                }
            }
        }
Пример #2
0
        public int setHost(HostItem it)
        {
            int ret = 0;

            if (list.ContainsKey(it.Before))
            {
                ret = 1;
            }

            list[it.Before] = it;
            if (it.isPattern())
            {
                patternList[it.Before] = it.After;
            }
            return(ret);
        }
Пример #3
0
        /**
         * 현재는 패턴 체크를 하나만 하도록 되어 있음
         *
         */
        public HostCheck checkPattern(string url)
        {
            foreach (KeyValuePair <string, string> it in patternList)
            {
                HostItem item = getHostItem(it.Key);

                if (item.isPattern())
                {
                    // 문자열 매칭
                    if (url.IndexOf(item.Before) > -1)
                    {
                        if (item.Checked)
                        {
                            return(new HostCheck(true, item.type, item.Before, item.After));
                        }
                    }
                }
            }

            return(null);
        }
Пример #4
0
        private void setDictionary(ArrayList arr)
        {
            list.Clear();
            titleList.Clear();
            patternList.Clear();

            foreach(string temp in arr) {

                if (string.IsNullOrEmpty(temp)) break;
                if (temp.Trim().IndexOf(Util.DELIMITER_INFO) == 0) {
                    titleList.Add(temp.Trim());
                    continue;
                }

                HostItem it = new HostItem(temp.Trim().Split(','));

                if (it.error == 0) {
                    list[it.Before] = it;

                    if (it.isPattern()) {
                        patternList[it.Before] = it.After;
                    }
                }
            }
        }
Пример #5
0
        public int setHost(HostItem it)
        {
            int ret = 0;
            if (list.ContainsKey(it.Before)) {
                ret = 1;
            }

            list[it.Before] = it;
            if (it.isPattern()) {
                patternList[it.Before] = it.After;
            }
            return ret;
        }