Hasim.Injectify
0.1.1
See the version list below for details.
dotnet add package Hasim.Injectify --version 0.1.1
NuGet\Install-Package Hasim.Injectify -Version 0.1.1
<PackageReference Include="Hasim.Injectify" Version="0.1.1" />
<PackageVersion Include="Hasim.Injectify" Version="0.1.1" />
<PackageReference Include="Hasim.Injectify" />
paket add Hasim.Injectify --version 0.1.1
#r "nuget: Hasim.Injectify, 0.1.1"
#:package Hasim.Injectify@0.1.1
#addin nuget:?package=Hasim.Injectify&version=0.1.1
#tool nuget:?package=Hasim.Injectify&version=0.1.1
Injectify
A modular dependency injection system for ASP.NET Core applications. Automatically discovers modules across all projects in a solution — no manual registration needed.
Concept
Each project in your solution (Application, Core, EF Core, UI, etc.) defines its own module that registers its own dependencies. The host project (UI) discovers and initializes all modules automatically with just two calls:
// Program.cs — only 2 lines needed
var builder = WebApplication.CreateBuilder(args);
builder.InjectifyApplication();
// ...
var app = builder.Build();
app.InjectifyInitializer();
app.Run();
Features
| Feature | Description | Status |
|---|---|---|
| Module System | Autonomous modules with DI registration and pipeline configuration | ✅ |
| Auto-Discovery | Recursive assembly scanning to discover all IModule implementations | ✅ |
| Module Metadata | [ModuleInfo], [ModuleOrder], [DependsOn] attributes |
✅ |
| Dependency Graph | DAG validation with topological sort and cycle detection | ✅ |
| Lifecycle Hooks | OnInit, OnStart, OnStop via IModuleLifecycle |
✅ |
Installation
dotnet add package Injectify
Quick Start
1. Create a module in each project
using Injectify.Modules;
[ModuleInfo("My Module", "1.0.0", "Description of the module")]
[ModuleOrder(10)]
public class MyModule : BaseInjectifyModule
{
public override void ConfigureService(IServiceCollection services, IConfiguration configuration)
{
services.AddScoped<IMyService, MyService>();
}
public override void ConfigureApplication(WebApplication app)
{
app.Logger.LogInformation("MyModule initialized");
app.UseMiddleware<MyMiddleware>();
}
}
2. In the UI project — 2 lines
var builder = WebApplication.CreateBuilder(args);
builder.InjectifyApplication(); // Scans all assemblies, discovers all IModule
var app = builder.Build();
app.InjectifyInitializer(); // Calls ConfigureApplication on each module
app.Run();
3. Module lifecycle
public class MyModule : BaseInjectifyModule
{
public override void OnInit(IServiceCollection services) { /* before registration */ }
public override void OnStart(WebApplication app) { /* after build, before run */ }
public override void OnStop() { /* on shutdown */ }
}
4. Module dependencies
[DependsOn(typeof(CoreModule))]
[DependsOn(typeof(EFCoreModule))]
public class UIModule : BaseInjectifyModule { }
Packages
| Package | Description |
|---|---|
Injectify |
Module system with DI registration, pipeline config, and module lifecycle |
Project structure
Injectify/
├── Attributes/ # [DependsOn], [ModuleInfo], [ModuleOrder]
├── Exceptions/ # InjectifyException, DependencyCycleException
├── Extensions/ # Fluent DI extension methods (InjectifyApplication, InjectifyInitializer)
├── Modules/ # IModule, IModuleLifecycle, BaseInjectifyModule
├── Setup/ # IModuleLoader, ModuleLoader (assembly scanning, topological sort)
└── Injectify.Tests/ # Unit tests (xUnit)
Documentation
- README.fr.md — Documentation en français
- CLAUDE.md — Project conventions
- AGENTS.md — Agent configuration
- PRODUCT.md — Functional specifications
- ANALYSIS.md — Architecture decisions
- PROGRESS.md — Current progress & next steps
- AUDIT.md — Audit findings & technical debt
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Hosting.Abstractions (>= 8.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Options (>= 8.0.2)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Hasim.Injectify:
| Package | Downloads |
|---|---|
|
Hasim.Auditify
A lightweight, pluggable audit-trail library for EF Core 8+. Automatically captures entity changes (Added/Modified/Deleted), supports sensitive data masking, soft-delete patterns, and timestamp tracking. |
|
|
Hasim.EntityFrameworkCore
A customizable ASP.NET Core Identity entities library providing reusable base identity models and common abstractions for modern .NET applications. |
|
|
Hasim.Infrastructure
Todo Description. |
GitHub repositories
This package is not used by any popular GitHub repositories.