I’m working on a presentation for the Twin Cities Code Camp and I’ve upgraded some old samples that Microsoft provided for the new version of .NET 3.5. Upon doing so I imagined the question coming up during the presentation “Well, can we use LINQ in the rule set editor”? Good question.
And here’s the simple answer: NO.
Check it out – this it the validation error from the RuleSetDialog editor.
In my opinion the editor should allow this, but alas it doesn’t as this would be rather difficult to represent in the serialized RuleSet file. This might be an issue with the form supporting code definitions in the conditional window, which is probably a whole new bunch of problems.
I have also looked to extend the form but this does not look possible and from a few forum posts I’ve read Microsoft does not want you extending this control. Bummer man.
Hacky Fix
Place all of your LINQ code style items in Properties or methods that you can then access from the Condition window. Not a superb answer, but it works in a bind.
Leave a Reply
You must be logged in to post a comment.