Equibles.Core.AutoWiring 1.0.1

dotnet add package Equibles.Core.AutoWiring --version 1.0.1
                    
NuGet\Install-Package Equibles.Core.AutoWiring -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Equibles.Core.AutoWiring" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Equibles.Core.AutoWiring" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Equibles.Core.AutoWiring" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Equibles.Core.AutoWiring --version 1.0.1
                    
#r "nuget: Equibles.Core.AutoWiring, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Equibles.Core.AutoWiring@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Equibles.Core.AutoWiring&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Equibles.Core.AutoWiring&version=1.0.1
                    
Install as a Cake Tool

Equibles.Core.AutoWiring

NuGet CI codecov

A lightweight attribute-based service registration library for .NET. Automatically discovers and wires services into the Microsoft.Extensions.DependencyInjection container by scanning assemblies for classes decorated with [Service], reducing boilerplate and improving maintainability.

Requirements

  • .NET 8.0, 9.0, or 10.0

Installation

dotnet add package Equibles.Core.AutoWiring

Usage

1. Decorate your services with [Service]

using Equibles.Core.AutoWiring;
using Microsoft.Extensions.DependencyInjection;

// Registers as itself with Scoped lifetime (default)
[Service]
public class OrderProcessor { }

// Registers as INotificationService with Singleton lifetime
[Service(ServiceLifetime.Singleton, typeof(INotificationService))]
public class EmailNotificationService : INotificationService { }

// Registers without replacing existing registrations
[Service(ServiceLifetime.Transient, typeof(INotificationService), replaceExisting: false)]
public class SmsNotificationService : INotificationService { }

2. Wire services from an assembly

using Equibles.Core.AutoWiring;

var builder = WebApplication.CreateBuilder(args);

// Scan the assembly containing Program for [Service] classes
builder.Services.AutoWireServicesFrom<Program>();

var app = builder.Build();
app.Run();

The AutoWireServicesFrom<T>() method scans the assembly containing T and registers all classes decorated with [Service].

[Service] Attribute

Parameter Type Default Description
lifetime ServiceLifetime Scoped The DI lifetime (Singleton, Scoped, Transient)
interfaceType Type null The service type to register as. If null, registers as the concrete class itself
replaceExisting bool true If true, removes any existing registration for the same service type before adding

Multi-Assembly Registration

For projects with multiple assemblies, add a marker class to each assembly and call AutoWireServicesFrom for each:

// In each assembly, add an empty marker class
public class MyAssemblyMarker { }

// In Program.cs
builder.Services.AutoWireServicesFrom<MyAssemblyMarker>();
builder.Services.AutoWireServicesFrom<AnotherAssemblyMarker>();

License

MIT

Author

Daniel Oliveira

Website X LinkedIn

Product 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 is compatible.  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 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on Equibles.Core.AutoWiring:

Repository Stars
daniel3303/Equibles
Self-hosted, open-source financial data MCP server for AI agents — SEC filings, XBRL financials, 13F holdings, insider & congressional trades, short interest, FRED, CFTC/CBOE and daily prices across 64 MCP tools. Equibles Cloud adds earnings call transcripts, live quotes, options chains with Greeks, guidance and a screener.
Version Downloads Last Updated
1.0.1 34,642 3/24/2026
1.0.0 4,143 9/5/2025