LINQ Predicates Conditionals and Assignment
I am trying to work a dynamic way to define conditional rules that need to
apply to data in a report. What I want is to allow the end user specify
the conditions in a configuration, which is then compiled and executed
when the report is run.
Now if done in code, I would have something like the code below.
public int showTopEntries{get; set;}
. . . .
showTopEntries = showTopEntries >= totalEntries ? totalEntries :
showTopEntries;
However since I would prefer to have the user provide this rule in a text
file, where it is read and translated, in code. How can I parse a string
of the form(below) into the statement above please?
PropertyToSet= "showTopEntries" Condition ="showTopEntries >=
totalEntries" ifTrue="totalEntries" ifFalse="showTopEntries"
Thanks in advance for your suggestions.
No comments:
Post a Comment