RuleSetDialog & LINQ Queries

by Donn Felker 2. October 2008 06:11

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.

 

image

 

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.

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

.NET

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

About the author

Donn Felker

Senior Consultant
MCTS
ScrumMaster
Agile Practitioner

About Me | Books I Recommend

Gotta Pay The Bills


Tag cloud

    Popular Posts

    RecentComments

    Comment RSS

    Calendar

    <<  October 2008  >>
    MoTuWeThFrSaSu
    293012345
    6789101112
    13141516171819
    20212223242526
    272829303112
    3456789

    View posts in large calendar