Uploaded image for project: 'Spring.NET'
  1. Spring.NET
  2. SPRNET-1562

Having issue with Spring Expression, unable to get expression to evaluate an instance

    Details

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              sbohlen Steve Bohlen
              Reporter:
              dsscsystems Willie Johnson Jr
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 1.25d
                1.25d
                Remaining:
                Remaining Estimate - 10m
                10m
                Logged:
                Time Spent - Not Specified Time Not Required
                Not Specified