Skip to content

This is an extreme light library for the inverse of control.

Notifications You must be signed in to change notification settings

ChenKQ/LightIoC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LightIoC

This is an extreme light library for the inverse of control.

Usage Guide

1. import this lib

Copy "LightIoC.dll" and "LightIoC.dll.config" to the folder of exe。 Set the value of IoCFile in "LightIoC.dll.config" to figure out the file of IoC settings.

2. configure LightIoC

Modify the file of IoC settings. An example can be seen in ioc/example.xml "typename" is the Interface or base class. "tnamespace" figures out the namespace of instance. "tclassname" is the name of class of instance. "tassemblyname" is the assembly name.

3. configure app.conf

Add the folder of libs in app.conf as can seen following. This dynamic assembly should be in the main folder. <runtime >
 <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  <probing privatePath="plugins;Template"/>
 </assemblyBinding>
</runtime>

Example

while (true)
{
 IShut animal = (IShut)Instance.createInstance("IShut");
 animal.shut();
 Thread.Sleep(1000);
}

About

This is an extreme light library for the inverse of control.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages