Monthly Archives: June 2014

C# WCF – Ninject Ioc

In order to use Ioc to instantiate a WCF service class, Ioc should provide implementation of following two interfaces. IInstanceProvider IServiceBehavior Implement IServiceBehavior Implement IInstanceProvider Example class Advertisements

Posted in .NET, Programming | Tagged | Leave a comment

Design principles that you should not forget on software design

1. The Single Responsibility Principle 2. The Open Closed Principle 3. The Liskov Substitution Principle 4. The Interface Segregation Principle 5. The Dependency Inversion Principle

Posted in Code, Programming | Tagged | Leave a comment

C++11 – Pointer casts

C++11 introduced a new way to cast shared_ptr as shown below. std::dynamic_pointer_cast std::static_pointer_cast std::const_pointer_cast

Posted in C++, Programming | Tagged | Leave a comment

C++11 – coroutine

The following article is showing a nice example how C++11 can support coroutine feature. C# has already supported this feature from C# 2.0. http://paoloseverini.wordpress.com/2014/06/09/generator-functions-in-c/ What is a coroutine? You can find details from the following Wikipedia. http://en.wikipedia.org/wiki/Coroutine

Posted in C++, Programming | Tagged | Leave a comment