Prism: Review, Part I

These are my thoughts about drop 03-25-2008 of Prism, patterns & practices’ composite WPF application guidance. I understand that this is only a preview release, and it is likely the code will change in the future, rendering these thoughts obsolete.
Before I get into the code, I want to prefix this post with thoughts on […]

Tip: Locking when calling external code

Can you spot the danger in the following code?
public T GetItem(Func<T, bool> finder)
{
T result = default(T);
lock (_itemsLock)
{
foreach (T item in _items)
{
[…]

Presentation: 30/03/2008 - Adelaide Happens - LINQ

This afternoon I spoke about LINQ at the ADNUG Happens event. I covered:

How we got to LINQ: IEnumerable, Anonymous Delegates, Generics
New features that enable LINQ: Extension methods, generic parameter interference, lambda expressions, anonymous types
What LINQ is
LINQ flavours:

LINQ to Objects
LINQ to XML
LINQ to SQL
LINQ to CRM (open source)

The slides and code are on Subversion:
http://svn.paulstovell.net/Presentations/LINQ/
Here are the […]

VB.NET: Where’s Action<T> support?

The release of a new version of .NET always provides an opportunity to shake our fists at the VB.NET language. Just when you thought the languages were finally equal, they’ve proven that once again VB.NET is a second class citizen in the country of .NET.
The C# 2.0 compiler introduced Anonymous Delegates. It allowed you […]

Project: NullObject.For

When using dependency injection frameworks, mock objects or just good OO design, you may have code that relies on an implementation of an interface that you don’t particularly care about when testing.
For example, suppose you’re writing unit tests against a class which relies on an ILogger object. Your unit tests may not particularly care […]