internal string GetEscapedValue(string value, char?escapeChar = null)
 {
     if (escapeChar.HasValue)
     {
         return(_dialect.Escape(value, escapeChar.Value));
     }
     return(_dialect.Escape(value));
 }
Exemple #2
0
        public void testExpressionFunctions_escape_withBackslash()
        {
            var dialect = new StandardDialect();

            dialect.Escape("a\\a%a_", '\\').Is("a\\\\a\\%a\\_");

            //var input = "a\\a%a_";
            //var result = Regex.Replace(input, "[\\%\\\\_]", "\\$0");
            //result.Is("a\\\\a\\%a\\_");

            //var input = "a\\a%a_";
            //var result = Regex.Replace(input, @"[\\%\\_]", "\\$0");
            //result.Is("a\\\\a\\%a\\_");

            //var input = "a\\a%a_";
            //var result = Regex.Replace(input, "[\\\\%\\\\_]", "\\$0");
            //result.Is("a\\\\a\\%a\\_");
        }
Exemple #3
0
        public void testExpressionFunctions_escape_withExclamation()
        {
            var dialect = new StandardDialect();

            dialect.Escape("a!a%a_", '!').Is("a!!a!%a!_");
        }
Exemple #4
0
        public void testExpressionFunctions_escape()
        {
            var dialect = new StandardDialect();

            dialect.Escape("a$a%a_").Is("a$$a$%a$_");
        }