BarbarianIOC简单的 IoC 容器
BarbarianIOC 是一个简单的 .NET 实现的 IoC 容器,示例代码:
Container = new Container(); int someMockAge = 23; // this could come from anywhere (App.Config / database etc etc) //Register ALL components container.RegisterComponents( //where you can use concrete type new Component().For<Foo>().WithInstanceMode(InstanceMode.Transient), //or you can use an interface and it's implementation new Component().For<IBaz>().ImplementedBy<Baz>().WithInstanceMode(InstanceMode.Transient), //and you can also declare singleton instance mode if you like new Component().For<SomeIBazDependantClass>().WithInstanceMode(InstanceMode.Singleton), //and even supply some non IOC provided constructor params by way of an anonymous object new Component().For<SomeFooDependantClass>() .DependsOn(new { age=someMockAge }) .WithInstanceMode(InstanceMode.Transient) ); //allow the container to wire stuff up (essentially create Expression.New for all //components to allow Container to compile and create some quicker lookup delegates) container.WireUp();
评论
Infector++C++11 的 IoC 容器
Infector++是一个简单轻量级的C++11的IoC容器。特点:Exceptionsafety(STRONGGUARANTEE)VirtuallyremovememoryleaksLightwei
Infector++C++11 的 IoC 容器
0
Signal FrameworkJ2ME平台的IoC 容器
SignalFramework是SpringIoC容器在J2ME平台下的移植版本,旨在克服J2ME平台的限制提供一个J2ME平台下的IoC容器框架。
Signal FrameworkJ2ME平台的IoC 容器
0