Implement a IOC container by myself.