ClassRadExpressionParser
An expression parser that parses a string into an lambda expression.
Definition
Namespace:Telerik.Expressions
Assembly:Telerik.Windows.Data.dll
Syntax:
public class RadExpressionParser : IDisposable
Inheritance: objectRadExpressionParser
Implements:
Constructors
RadExpressionParser()
Initializes a new instance of the RadExpressionParser class.
Declaration
public RadExpressionParser()
Properties
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Implements
Dispose(bool)
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
disposing
Parse(string)
Converts the string representation of an expression to its LambdaExpression equivalent.
Declaration
public LambdaExpression Parse(string expression)
Parameters
expression
The string expression to be parsed.
Returns
Exceptions
ExpressionParserException.
ParseAsync(string)
Run a parse operation and returns the resulting lambda expression.
Declaration
public Task<LambdaExpression> ParseAsync(string expression)
Parameters
expression
The string expression to be parsed.
Returns
Exceptions
ExpressionParserException.
ParseAsync(string, CancellationToken)
Run a parse operation and returns the resulting lambda expression.
Declaration
public Task<LambdaExpression> ParseAsync(string expression, CancellationToken cancellationToken)
Parameters
expression
The string expression to be parsed.
cancellationToken
The cancellation token that will be assigned to the new task.
Returns
Exceptions
ExpressionParserException.
TryParse(string, out LambdaExpression)
Converts the string representation of an expression to its LambdaExpression equivalent. A return value indicates whether the conversion succeeded or failed.
Declaration
public bool TryParse(string expression, out LambdaExpression lambda)
Parameters
expression
A string containing an expression to convert.
lambda
When this method returns, contains the LambdaExpression equivalent of the s parameter, if the conversion succeeded, or null if the conversion failed. The conversion fails when the supplied expression contains invalid operators or operands;any value originally supplied in result will be overwritten.
Returns
true if expression was converted successfully; otherwise, false.