The code pattern of doing everything in IQueryProvider…

(Rambling) I’m taking another short foray into IQueryable land. From my learnings last time, In brief, I realized that IQueryable = Expression Tree, + QueryProvider, and that if you take a lazy approach to implementing IQueryable, then all the real work is happening inside QueryProvider.Execute(), where it can just retranslate the entire expression tree you…


(WF4.5) Using CSharpValue<T> and CSharpReference<T> in .Net 4.5 – Compiling expressions–and changes in Visual Studio generated XAML

I’ve been publicizing for a while that Visual Studio 11 (still in Beta) supports C# expressions in workflow designer. Of course you might also possibly want to use C# or VB expressions by writing a workflow in code, instead of by building it in Visual Studio. There are actually a couple tricks to doing this,…

5

(WF4) Less Known Features – Declarative Expressions using Activities, and ExpressionServices.Convert

If you’re exclusively using the Visual Studio workflow designer to design activities, you might go for a very long time (or forever) without discovering a particular System.Activities namespace, which is System.Activities.Expressions. The first reason you might never discover them is that none of the activities here are visible in the Visual Studio workflow toolbox by…


(WF4) Adding VB namespace Imports to your workflow programmatically

These questions (paraphrased) have come up a bunch of times so it’s not that hard to find the answer, but I just rediscovered them so it’s on topic for today. “I want to add a namespace to the Imports designer automatically at design time, so the user doesn’t have to do it manually. How can…

3