Locking & async/await

Posted: Tuesday, 10 December 2019

You may have noticed that the C# compiler gets very upset if you try to use an `await` inside a `lock` statement. There is a reason for this but what if you need synchronization when calling async methods?

Something about nothing

Posted: Tuesday, 12 September 2017

I must admit when I first saw the list of new language features for C# 6 like many I wasn’t that impressed, especially off the back of async/await. This last month I have at last started my first new real C# 6 project and I must say while the features have not been earth shattering they are actually a joy to use…

Unit testing decorator base classes

Posted: Tuesday, 12 September 2017

When using the decorator pattern it is a common practice to create a base class implementation of the abstraction that simply forwards all calls to the decorated class. This means that in the actual functional decorators, once you derive from this base class, you only need to implement the behaviour for the specific methods...