Ejemplo n.º 1
0
        public void EvaluateStatement(Document doc)
        {
            string name = doc.GetVariable(m_name);
            bool   fRes = (name != null);


            if (fRes && m_fOnlyDefined == false)
            {
                if (m_value != null)
                {
                    fRes = Regex.IsMatch(name, m_value, RegexOptions.IgnoreCase);
                }

                if (m_set != null)
                {
                    fRes = false;

                    foreach (string word in m_set.Split(' '))
                    {
                        if (word != null && word.Length > 0)
                        {
                            if (String.Compare(name, word, true) == 0)
                            {
                                fRes = true;
                                break;
                            }
                        }
                    }
                }
            }

            if (fRes == m_fPass)
            {
                EvaluateStatementInner(doc);
            }
        }
Ejemplo n.º 2
0
        public void EvaluateStatement( Document doc )
        {
            string name = doc.GetVariable( m_name );
            bool   fRes = (name != null);


            if(fRes && m_fOnlyDefined == false)
            {
                if(m_value != null)
                {
                    fRes = Regex.IsMatch( name, m_value, RegexOptions.IgnoreCase );
                }

                if(m_set != null)
                {
                    fRes = false;

                    foreach(string word in m_set.Split( ' ' ))
                    {
                        if(word != null && word.Length > 0)
                        {
                            if(String.Compare( name, word, true ) == 0)
                            {
                                fRes = true;
                                break;
                            }
                        }
                    }
                }
            }

            if(fRes == m_fPass)
            {
                EvaluateStatementInner( doc );
            }
        }
Ejemplo n.º 3
0
        public bool EvaluateCondition( Document doc )
        {
            Regex re = new Regex( m_value, RegexOptions.IgnoreCase );

            return re.IsMatch( doc.GetVariable( m_name ) );
        }
Ejemplo n.º 4
0
        public bool EvaluateCondition(Document doc)
        {
            Regex re = new Regex(m_value, RegexOptions.IgnoreCase);

            return(re.IsMatch(doc.GetVariable(m_name)));
        }