Monthly Archives: January 2010

Web Site Globalization With ASP.NET Routing

For those who don’t know, I have this web site http://PauloMorgado.NET/ that I use both as a web presence besides my blogs and a playfield. Because I write both in English and Portuguese, I wanted the web site to have … Continue reading

Posted in 10411, 12314, 2666, 2670, 2675, 2676, 2681 | Leave a comment

Coupling ASP.NET Session State With Forms Authentication

Today I was talking with João about a way to couple the lifetime of the ASP.NET session state with the lifetime of Forms Authentication ticket. My idea was to store the session ID in the UserData property of the forms authentication … Continue reading

Posted in 10411, 12007, 12314, 2666, 2670, 2672, 2675, 2676, 2681 | Leave a comment

Playing With LINQ: Getting Interface Property Implementations

Today, my friend Nuno was writing some code to get the PropertyInfos of a class implementation of an interface. Given this interface: public interface ISomeInterface { int IntProperty { get; set; } string StringProperty { get; } void Method(); } … Continue reading

Posted in 10411, 12314, 12721, 2666, 2673, 2675, 2676, 6182 | Leave a comment

A TraceListener For Tests

In my code, I make extensive use of debug assertions (see System.Diagnostics.Debug.Assert). These assertions are very helpful while debugging because you don’t need to step into every line of code to see if all pre-conditions are met. As soon as … Continue reading

Posted in 10411, 12761, 2666, 3302, 3649, 6428, 8431 | Leave a comment

How To Set Elements Of An Array Of A Private Type Using Visual Studio Shadows

Visual Studio uses Publicize to create accessors public for private members and types of a type. But when you try to set elements of a private array of elements of a private type, things get complicated. Imagine this hypothetic class … Continue reading

Posted in 10411, 12007, 12314, 12721, 2666, 2673, 2675, 2676, 3302, 3649, 6182, 8431, 9400 | Leave a comment