Skip to content

About

This helper let you to register classes and interfaces in the service collection.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

24 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ServiceCollectionHelpers.AssemblyFinder

This package contains helpers to find assemblies class or interface and register them in the dependency injection container.

==========

Onboarding Instructions

Installation

  1. Add nuget package:

Install-Package ServiceCollectionHelpers.AssemblyFinder

  1. In your application, you can call the extension RegisterClassesOfType to find and register some classes or interfaces :
    builder.Services.RegisterClassesOfType<ISomeInterface>();

In case of the type is a class, it will register all classes that inherits from the type. In case of the type is an interface, it will register all classes that implements the interface.

By default, all register classes are registered as Transient. But you can override this configuration by using the overload of the method :

    builder.Services.RegisterClassesOfType<ISomeInterface>(new RegisterAsOptions()
    {
        RegisterAs = RegisterAs.Scoped
    });

You can find more details and samples in the Wiki or in unit tests.

IC

Quality Gate Status .NET NuGet package

Documentation : I want more

Do not hesitate to check unit tests on the solution. It's a good way to check how transformations are tested.

Also, to get more samples, go to the Wiki.

Do not hesitate to contribute.

Support / Contribute

If you have any questions, problems or suggestions, create an issue or fork the project and create a Pull Request.

About

This helper let you to register classes and interfaces in the service collection.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages