Esempio n. 1
0
        public bool Match(CodeExpression expression)
        {
            StartsWithString other = expression as StartsWithString;

            return((other != null) &&
                   RuleExpressionWalker.Match(_toLowerMethodInvocationExpression, other._toLowerMethodInvocationExpression) &&
                   RuleExpressionWalker.Match(_toStringMethodInvocationExpression, other._toStringMethodInvocationExpression) &&
                   RuleExpressionWalker.Match(_startsWithMethodInvocationExpression, other._startsWithMethodInvocationExpression));
        }
Esempio n. 2
0
        public CodeExpression Clone()
        {
            StartsWithString result = new StartsWithString();

            result._toStringMethodInvocationExpression   = RuleExpressionWalker.Clone(_toStringMethodInvocationExpression);
            result._toLowerMethodInvocationExpression    = RuleExpressionWalker.Clone(_toLowerMethodInvocationExpression);
            result._startsWithMethodInvocationExpression = RuleExpressionWalker.Clone(_startsWithMethodInvocationExpression);

            return(result);
        }