protected bool TryReadValue(AllowNonQuotedText allowNonQuotedText, out object value) { SkipWhitespace(); if (IsComplete) { throw new MvxException("Unexpected termination while reading value in {0}", FullText); } var currentChar = CurrentChar; if (currentChar == '\'' || currentChar == '\"') { value = ReadQuotedString(); return(true); } if (char.IsDigit(currentChar) || currentChar == '-') { value = ReadNumber(); return(true); } bool booleanValue; if (TryReadBoolean(out booleanValue)) { value = booleanValue; return(true); } if (TryReadNull()) { value = null; return(true); } if (allowNonQuotedText == AllowNonQuotedText.Allow) { value = ReadTextUntil(',', ';'); return(true); } value = null; return(false); }
protected bool TryReadValue(AllowNonQuotedText allowNonQuotedText, out object value) { SkipWhitespace(); if (IsComplete) { throw new MvxException("Unexpected termination while reading value in {0}", FullText); } var currentChar = CurrentChar; if (currentChar == '\'' || currentChar == '\"') { value = ReadQuotedString(); return true; } if (char.IsDigit(currentChar) || currentChar == '-') { value = ReadNumber(); return true; } bool booleanValue; if (TryReadBoolean(out booleanValue)) { value = booleanValue; return true; } if (TryReadNull()) { value = null; return true; } if (allowNonQuotedText == AllowNonQuotedText.Allow) { value = ReadTextUntil(',', ';'); return true; } value = null; return false; }