Info
Version: | 2.2.1 |
Author(s): | agovorov, astaerk |
Last Update: | Saturday, March 5, 2022 |
.NET Fiddle: | Create the first Fiddle |
Project Url: | https://github.com/astaerk/AutoRegistration |
NuGet Url: | https://www.nuget.org/packages/UnityAutoRegistration |
Install
Install-Package UnityAutoRegistration
dotnet add package UnityAutoRegistration
paket add UnityAutoRegistration
UnityAutoRegistration Download (Unzip the "nupkg" after downloading)
Dependencies
.NETFramework 4.0
- Unity(>= 5.1.2)
- Unity(>= 5.1.2)
- Microsoft.Extensions.DependencyModel(>= 2.0.0)
- NETStandard.Library(>= 1.6.1)
- System.Reflection.TypeExtensions(>= 4.4.0)
- System.Runtime.Loader(>= 4.3.0)
- Unity(>= 5.1.2)
- System.Reflection.TypeExtensions(>= 4.4.0)
- Unity(>= 5.1.2)
Tags
Using few lines of code you can scan specified assemblies and register all types that satisfy your rules.
Rules for determining whether to include/exclude types/assemblies are predicates (Predicate<T>) so you can use lambda syntax or direct method name to specify them. There are a few methods in an If helper class (like Implements, DecoratedWith) to cover some common scenarios of type registration.