IoC container for .NET (C#) Lightweight. XML-configurable. Very fast.


Ultra-lightweight XML-configurable (Spring-like) inversion of control container for .NET. Part of NIC.NET open-source library.

features

  • Configurable with Spring-like XML syntax
  • Supports constructor and setter injections
  • Effectively handles large XML configurations (25 Mb and bigger)
  • Fast: >100,000 object instantiations per second
  • Supports multi-file configurations with Mvp.Xml XInclude implementation
  • Really lightweight: all you need is one assembly (55kb!)
  • Free and open source (LGPL)

links

how to use

  1. Install NI.Ioc nuget package
  2. using NI.Ioc;
    ...
    var config = new XmlComponentConfiguration(xmlConfigString);
    IComponentFactory ioc = new ComponentFactory(config);
    
    var sb = ioc.GetComponent<StringBuilder>("sb1");

XML configuration example