Skip to content

Latest commit

 

History

History
38 lines (32 loc) · 1.48 KB

README.md

File metadata and controls

38 lines (32 loc) · 1.48 KB

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.