AutoDIRegister 1.0.4

dotnet add package AutoDIRegister --version 1.0.4
                    
NuGet\Install-Package AutoDIRegister -Version 1.0.4
                    
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="AutoDIRegister" Version="1.0.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AutoDIRegister" Version="1.0.4" />
                    
Directory.Packages.props
<PackageReference Include="AutoDIRegister" />
                    
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 AutoDIRegister --version 1.0.4
                    
#r "nuget: AutoDIRegister, 1.0.4"
                    
#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 AutoDIRegister@1.0.4
                    
#: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=AutoDIRegister&version=1.0.4
                    
Install as a Cake Addin
#tool nuget:?package=AutoDIRegister&version=1.0.4
                    
Install as a Cake Tool

ServicesRegisterPlugin

AutoDIRegister is a dynamic service registration plugin for .NET, enabling automatic service registration based on custom attributes. It supports different service lifetimes, such as Singleton, Scoped, and Transient, and provides configurable options for flexible dependency injection.

Features

  • Automatically registers services marked with custom attributes: [Singleton], [Scoped], and [Transient].
  • Configurable options to customize service registration behavior.
  • Supports open generics and custom type filters.
  • Handles registration conflicts gracefully based on configuration.

Getting Started

Installation

You can install the package via NuGet:

dotnet add package AutoDIRegister
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 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. 
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

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.4 158 10/24/2024
1.0.3 111 10/24/2024
1.0.2 116 10/23/2024
1.0.1 103 10/23/2024
1.0.0 111 10/23/2024

# Release Notes

## [1.0.0] - 2024-10-17
### Initial Release
- Added support for automatic service registration based on custom attributes: `[Singleton]`, `[Scoped]`, and `[Transient]`.
- Implemented configuration options via `ServiceRegistrationOptions` for flexible registration.
- Added support for registering open generic types.
- Enabled custom type filters to control which services should be registered.
- Added conflict handling options to gracefully handle duplicate registrations.
- Provided extension methods for easy integration with `IServiceCollection`.

## [1.1.0] - 2024-11-01
### Improvements
- Enhanced registration performance for large assemblies.
- Added support for custom lifetime options for individual services.
- Improved error handling and logging during the registration process.

## [1.1.1] - 2024-11-10
### Bug Fixes
- Fixed a bug where services with multiple lifetimes were not registered correctly.
- Addressed an issue where open generic types were not resolved properly in some cases.

## [1.2.0] - 2024-12-01
### New Features
- Added support for attribute-based filtering based on attribute parameters.
- Introduced an event-based system for tracking registration actions (`OnRegistering` callback).
- Enabled handling of additional custom attributes for future extensibility.