November 2006 - Posts
As mentioned before, the Patterns and Practices teams has already started working on Enterprise Library v3. Tom Hollander reveals today the first upcoming application block targeted for this release - Validation Application Block. The Validation Application Block will include a comprehensive library of common validation rules that apply to not only primitive data types, but can be easily applied to your custom complex types.
Read all about it here.
Look interesting...
Enjoy!
A new article on December 2006 MSDN Magazine discusses one of the most important aspects in Windows Workflow Foundation - Building Custom Activities. It covers the core components required for building custom activities for your business domain, including runtime responsibilities, design time experience, and asynchronous activity development.
Read it here.
Enjoy!
After I got back from Devscovery I filled a review form and won a 50$ gift certificate at Amazon.com. The books arrived this weekend, now all I have to do is find the time to read them...
I spent most of the last weekend celebrating my 26 birthday with my friends and family.


Happy Birthday it was...
Invoke a Static Generic Method using Reflection
Assume you have a class with a static generic method:
class ClassWithGenericStaticMethod
{
public static void PrintName<T>(string prefix) where T : class
{
Console.WriteLine(prefix + " " + typeof(T).FullName);
}
}
How can you invoke this method using relection?
It turns out to be very easy... This is how you Invoke a Static Generic Method using Reflection:
// Grabbing the type that has the static generic method
Type typeofClassWithGenericStaticMethod = typeof(ClassWithGenericStaticMethod);
// Grabbing the specific static method
MethodInfo methodInfo = typeofClassWithGenericStaticMethod.GetMethod("PrintName", System.Reflection.BindingFlags.Static | BindingFlags.Public);
// Binding the method info to generic arguments
Type[] genericArguments = new Type[] { typeof(Program) };
MethodInfo genericMethodInfo = methodInfo.MakeGenericMethod(genericArguments);
// Simply invoking the method and passing parameters
// The null parameter is the object to call the method from. Since the method is
// static, pass null.
object returnValue = genericMethodInfo.Invoke(null, new object[] { "hello" });
Enjoy!
A new MSDN technical article provides a general discussion of key performance considerations and modeling guidelines that are important when developing applications on top of the Windows Workflow Foundation. It describes the performance characteristics of several illustrative scenarios that include some of the key features in WF.
If you're using Windows Workflow Foundation, this artical is essential.
Enjoy!
BlogMailr makes publishing to your blog simpler. There is nothing to download, nothing to install, it’s free for personal use, and works with all popular blogging software.
With BlogMailr you can publish to your blog from anything that can send an email whether it’s your PC, Mac, Phone, BlackBerry, PDA … you name it. If you can send an email you’ve got everything you need to use BlogMailr.
So I am giving it a try…
Published with BlogMailr
This is absolutely a great RTM week for Microsoft!
Available downloads:
Enjoy!
This CTP contains Samples for ADO.NET features in the Visual Studio Code Name “Orcas” - October CTP. Download it from here.
Visual Studio Code Name “Orcas” - October CTP is a prerequisite for these samples.
Enjoy!
Microsoft plans to launch Windows Vista and Office 2007 for business customers on Nov. 30. Currently, there is no specific date for the retail versions to be available.
Seattle PI has the scoop.
In the mean time, take a look at the retail packages:
Enjoy!