Пример #1
0
        public bool Match(CodeExpression expression)
        {
            EndsWithString other = expression as EndsWithString;

            return((other != null) &&
                   RuleExpressionWalker.Match(_toLowerMethodInvocationExpression, other._toLowerMethodInvocationExpression) &&
                   RuleExpressionWalker.Match(_toStringMethodInvocationExpression, other._toStringMethodInvocationExpression) &&
                   RuleExpressionWalker.Match(_endsWithMethodInvocationExpression, other._endsWithMethodInvocationExpression));
        }
Пример #2
0
        public CodeExpression Clone()
        {
            EndsWithString result = new EndsWithString();

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

            return(result);
        }