Expression Evaluation Engine

4 posts, 1 answers
  1. Brian
    Brian avatar
    2 posts
    Member since:
    Jun 2012

    Posted 15 Jun 2012 Link to this post

    Is the engine being used to evaluate text expressions built into the RadExpressionEditor, or is it a separate assembly? I would like to use the RadExpressionEditor to build expressions within a WPF environment, but then I need to be able to take that expression text and rebuild the expression in an environment that does not have references to the WPF related assemblies.

    Thanks,
    Brian
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 19 Jun 2012 Link to this post

    Hello Brian,

    RadExpressionEditor's Expression property exposes a LambdaExpression. You could cast the value of the Expression property to LambdaExpression and call the Compile method of LambdaExpression, which returns a Delegate. 

    In regard to your question, you can use the RadExpressionEditor to build expressions within a WPF environment and then Compile() the returned LambdaExpression.  Once you have the result method you could work with it. 

    Regards,
    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Brian
    Brian avatar
    2 posts
    Member since:
    Jun 2012

    Posted 20 Jun 2012 Link to this post

    Ok, I believe you have answered my question, but let me clarify my situation in order to make sure. I have a WPF application in which I am using the RadExpressionEditor to create a LambdaExpression. I am saving the ExpressionText to a file. Then, I have a console application that I want to load that ExpressionText from, and rebuild that LambdaExpression.

    I would like for to be able to rebuild that LambdaExpression without referencing the RadExpressionEditor control so that my console application does have any dependencies on WPF. I would prefer to reference the underlying expression evaluation engine, which I would assume doesn't have any dependencies on WPF. From your answer, it sounds like that expression evaluation engine is built into the RadExpressionEditor, making what I want to do impossible. Is that correct?

    Thanks,
    Brian
  5. Answer
    Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 21 Jun 2012 Link to this post

    Hi Brian,

     Thank you for the additional details. 

    I have additionally checked how the engine for the RadExpressionEditor depends on WPF. As it turns out I have to agree with you that you will need the WPF related assemblies.

    Greetings,
    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top