Skip to content

mahmoudShaheen/Injector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Injector

Part of MoQa Project

Version:
- Injector
- Injector.Contracts
Author: Mahmoud Shaheen

Links:

Download
Website
Github

Why?

.Net DI Made Easy

Injector Takes .Net DI to the next level.
It allows to simply inject services from other projects easily which made separation of concerns easy!
you only need to do two things:

  1. Implement one of the interfaces in Injector.Contracts package according to the case (Singleton, Scoped, Transient).
  2. builder.Services.AddInjector().RegisterModule(typeof(Program));

Features:

  • Contracts:
    • Abstraction for Injector so it can be used in any project such as class libraries.
  • Services:
    • Calling AddInjector() Do the magic by scanning all provided modules and register services to IOC.
    • Three types are supported (Singleton, Scoped, Transient).
  • HostedServices:
    • Registers all hosted services in any given module to IOC.

How To Run:

  • Using Visual Studio
  • Open Injector.sln
  • Set example\TestApp as startup project
  • Run: press "F5"

How To Use:

An Example of usage is included in Example Folder.

About

.Net DI Made Easy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages