Class NumberParser
NumberParser
Inheritance
System.Object
NumberParser
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: System.Linq.Dynamic.Core.Parser
Assembly: System.Linq.Dynamic.Core.dll
Syntax
public class NumberParser
Constructors
| Improve this Doc View SourceNumberParser(ParsingConfig)
Initializes a new instance of the NumberParser class.
Declaration
public NumberParser(ParsingConfig config)
Parameters
Type | Name | Description |
---|---|---|
ParsingConfig | config | The ParsingConfig. |
Methods
| Improve this Doc View SourceParseIntegerLiteral(Int32, String)
Tries to parse the text into a IntegerLiteral ConstantExpression.
Declaration
public Expression ParseIntegerLiteral(int tokenPosition, string text)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tokenPosition | The current token position (needed for error reporting). |
System.String | text | The text. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.Expression |
ParseNumber(String, Type)
Parses the number (text) into the specified type.
Declaration
public object ParseNumber(string text, Type type)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | The text. |
System.Type | type | The type. |
Returns
Type | Description |
---|---|
System.Object |
ParseRealLiteral(String, Char, Boolean)
Parse the text into a Real ConstantExpression.
Declaration
public Expression ParseRealLiteral(string text, char qualifier, bool stripQualifier)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | |
System.Char | qualifier | |
System.Boolean | stripQualifier |
Returns
Type | Description |
---|---|
System.Linq.Expressions.Expression |
TryParseNumber(String, Type, out Object)
Tries to parse the number (text) into the specified type.
Declaration
public bool TryParseNumber(string text, Type type, out object result)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | The text. |
System.Type | type | The type. |
System.Object | result | The result. |
Returns
Type | Description |
---|---|
System.Boolean |