Skip to content

Invisionware/Invisionware.IoC

Repository files navigation

Invisionware.Ioc

Invisionware library for working with multiple IoC and DI frameworks

Support for following libraries

  • Autofac
  • Ninject

Usage

// Setup IoC
var container = new Invisionware.Ioc.Autofac.AutofacContainer(new Autofac.ContainerBuilder().Build());

// Register this container within the IoC framework so we can access it later if we need to register additional objects
container.Register<IDependencyContainer>(t => container);

// Set the GLOBAL Resolver (makes it easier to use)
Resolver.SetResolver(container.GetResolver());

// Use the GLOBAL Resolver to access the current IoC instance
var c = Resolver.Resolve<IDependencyContainer>();

// Now we can register a new object
c.Register(...)

About

Implements a generic IoC framework that can be used with any DI framework which allows you to isolate your code from being dependant on specific DI framework

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors