Exemplo n.º 1
0
        private static string ParseDefaultValue(ExpressionReader reader)
        {
            if (reader.PeekChar() != '|')
            {
                return(null);
            }

            reader.Read();

            if (reader.PeekChar() == '\'')
            {
                return(ConstantParser.Parse(reader));
            }

            var value = new StringBuilder();

            while (IsValidDefaultChar(reader.PeekChar()))
            {
                value.Append(reader.ReadChar());
            }

            return(value.ToString());
        }
Exemplo n.º 2
0
        private static ConstantExpression ParseConstant(ExpressionReader reader)
        {
            var constantValue = ConstantParser.Parse(reader);

            return(new ConstantExpression(constantValue));
        }