Tag Archives: C#

Future Values With Castle’s DynamicProxy

.NET has lots of support for asynchronous processing, which ASP.NET packages up very nicely in PageAsyncTasks. And yet I almost always find an excuse not to use them – they’re hard to test, it’s not instantly obvious what the logic … Continue reading

Posted in C#, Code, Programming | Tagged , , , | Leave a comment

Perfidy: Performance Testing In NUnit

Unsatisfied with calling QueryPerformanceCounter and being done with it, I spent today coming up with a fluent interface for performance testing in NUnit: using (At.Most(5).Seconds) { // Stuff that should take under 5 seconds } using (At.Most(1).Minute.GiveOrTake(10).Seconds) { // Stuff … Continue reading

Posted in C#, Code, Programming | Tagged , , , , | Leave a comment

NHibernate-friendly Types

It’s probably a combination of laziness and plain bad form to try and map too many BCL types to your database, but if you’re interested, I’ve gone through a few important assemblies and compiled a list of classes that: Are … Continue reading

Posted in C#, Code, Programming | Tagged , , , | Leave a comment

Safety! Implicit Operator!

Despite all the effort involved, operator overloading in C# is a nice syntactic hug you should always try and give your code. While that usually just gets you a bunch of boring comparison operators which you are forbidden to use … Continue reading

Posted in C#, Code | Tagged , , , | Leave a comment

Tragic 8-Ball

I get two 15-minute breaks and a lunch hour every day. While lunch is sacred, I decided recently that I could put the 2 * 15 minutes to better use than catching up on feeds and playing chess. And thus … Continue reading

Posted in C#, Code, Programming | Tagged , | Leave a comment