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

Add comment


(Will show your Gravatar icon)  

  Country flag

biuquote
  • Comment
  • Preview
Loading



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

    <<  January 2009  >>
    MoTuWeThFrSaSu
    2930311234
    567891011
    12131415161718
    19202122232425
    2627282930311
    2345678

    View posts in large calendar