Class
RadExpressionParser

An expression parser that parses a string into an lambda expression.

Definition

Namespace:Telerik.Expressions

Assembly:Telerik.Windows.Data.dll

Syntax:

cs-api-definition
public class RadExpressionParser : IDisposable

Inheritance: objectRadExpressionParser

Implements: IDisposable

Constructors

RadExpressionParser()

Initializes a new instance of the RadExpressionParser class.

Declaration

cs-api-definition
public RadExpressionParser()

Properties

Item

The parameter to be used if the expression contains such e.g. "() => parameter.ExampleProperty + 11".

Declaration

cs-api-definition
public object Item { get; set; }

Property Value

object

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration

cs-api-definition
public void Dispose()

Implements IDisposable.Dispose()

Dispose(bool)

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration

cs-api-definition
protected virtual void Dispose(bool disposing)

Parameters

disposing

bool

Parse(string)

Converts the string representation of an expression to its LambdaExpression equivalent.

Declaration

cs-api-definition
public LambdaExpression Parse(string expression)

Parameters

expression

string

The string expression to be parsed.

Returns

LambdaExpression

Exceptions

ExpressionParserException

ExpressionParserException.

ParseAsync(string)

Run a parse operation and returns the resulting lambda expression.

Declaration

cs-api-definition
public Task<LambdaExpression> ParseAsync(string expression)

Parameters

expression

string

The string expression to be parsed.

Returns

Task<LambdaExpression>

Exceptions

ExpressionParserException

ExpressionParserException.

ParseAsync(string, CancellationToken)

Run a parse operation and returns the resulting lambda expression.

Declaration

cs-api-definition
public Task<LambdaExpression> ParseAsync(string expression, CancellationToken cancellationToken)

Parameters

expression

string

The string expression to be parsed.

cancellationToken

CancellationToken

The cancellation token that will be assigned to the new task.

Returns

Task<LambdaExpression>

Exceptions

ExpressionParserException

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

cs-api-definition
public bool TryParse(string expression, out LambdaExpression lambda)

Parameters

expression

string

A string containing an expression to convert.

lambda

LambdaExpression

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

bool

true if expression was converted successfully; otherwise, false.