Announcement Announcement Module
Collapse
No announcement yet.
Having issue with Spring Expression, unable to get expression to work Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Having issue with Spring Expression, unable to get expression to work

    I am unable to get any expression to work that evaluates an instance of a custom class, using an alias.



    [Expression]
    PtnStats.Key == #BNSum

    [Variables]
    BNSum = "0"

    [typeAliases]
    <typeAliases>
    <alias name="Game" type="UltimateLotteryLib.BLL.Game, UltimateLotteryLib.Common" />
    <alias name="NumHst" type="UltimateLotteryLib.BLL.NumberHistory, UltimateLotteryLib.Common" />
    <alias name="NumStats" type="UltimateLotteryLib.BLL.NumberHistoryStatisti csII, UltimateLotteryLib.Common" />
    <alias name="GblStats" type="UltimateLotteryLib.Stats.NumberStatistics, UltimateLotteryLib.Stats" />
    <alias name="ColStats" type="UltimateLotteryLib.Stats.ColumnStatistics, UltimateLotteryLib.Stats" />
    <alias name="PtnStats" type="UltimateLotteryLib.Stats.GlobalPatternStatis tics, UltimateLotteryLib.Stats" />
    </typeAliases>


    [Code]
    var result = new object();
    object instance = new object();

    var expr_final = "PtnStats.Key == #BNSum";

    instance = new GlobalPatternStatistics();


    result = ExpressionEvaluator.GetValue(instance, expr_final, vars); // Invalid Cast Exception occurs when calling this function.
Working...
X