C# design pattern learning source code