The Telerik UI for WPF ExpressionParser helps you easily parse expressions without having to rely on the ExpressionEditor control.
Part of the Telerik UI for WPF suite with 150+ feature rich controls designed to fast-track your desktop app development and ensure consistent design.
The WPF UI suite comes with over 20+ fully customizable, built-in themes, document processing libraries, extensive product documentation and demos as well as industry-leading support.
In some scenarios, the ExpressionEditor graphical user interface is not required, but its parsing logic for a given expression is. With the Telerik UI for WPF ExpressionParser you can easily parse expressions through several methods.
You can use the Parse method to try to directly parse the expression and return a LambdaExpression if successfully parsed.
ParseAsync
The two overloads of the ParseAsync method operate in the same manner as the Parse method, with the difference being that they are performed asynchronously. In the second overload, aside from the expression to be parsed, you can pass a cancellation token that will be assigned to the new task.
The TryParse method tries to convert the string representation of an expression to its LambdaExpression equivalent. The returned value indicates whether the conversion succeeded or failed.
Item
You can use the Item property to be able to access the public members of the passed object.