Aiursoft.Scanner 8.0.1

Aiursoft Scanner

MIT licensed Pipeline stat Test Coverage NuGet version (Aiursoft.Scanner) ManHours

An Automatic dependencies management system for ASP.NET Core and powers Aiursoft.

Why this project

The traditional way to add dependencies is:

service.AddScoped<MyScopedDependency>();

Which means that you have to manually inject all dependencies. When you have too many of them, it is possible to make a mistake.

How to use Aiursoft.Scanner

First, install Aiursoft.Scanner to your ASP.NET Core project from nuget.org:

dotnet add package Aiursoft.Scanner

Add the interface to your class like this:

using Aiursoft.Scanner.Abstractions;

public class MySingletonService : ISingletonDependency
{

}

public class MyScopedService : IScopedDependency
{

}

public class MyTransientService : ITransientDependency
{

}

And just call this in your StartUp.cs:

using Aiursoft.Scanner;

services.AddScannedDependencies();

That's all! All your dependencies are registered. Just use it like previous before:

public class MyController : Controller
{
    private readonly MyScopedService _service;
    public MyController(MyScopedService service)
    {
        _service = service;
    }
}

Advanced usage

When you want to register a dependency that implements an abstract, your previous way is:

public class MyClass : IAbstract
{

}
service.AddScoped<IAbstract, MyClass>();

That's fine. But now we want to register this automatically.

Add the dependency interface to your service like this:

public class MyClass : IAbstract, IScopedDependency
{

}

When you are registering all dependencies in your StartUp.cs, tell us that your project supports your abstract.

services.AddScannedDependencies(typeof(IAbstract));

And you can call it with multiple abstracts:

services.AddScannedDependencies(typeof(IAbstract1), typeof(IAbstract2), typeof(IAbstract3));

That's all! Enjoy!

Showing the top 20 packages that depend on Aiursoft.Scanner.

Packages Downloads
Aiursoft.Directory.SDK
Nuget package of 'SDK' provided by Aiursoft
61
Aiursoft.Warpgate.SDK
Package Description
3
Aiursoft.Directory.SDK
Nuget package of 'SDK' provided by Aiursoft
3
Aiursoft.Directory.SDK
Package Description
3
Kahla.SDK
The base class, interfaces, services and bot framework for Aiursoft Kahla.
3
Aiursoft.Archon.SDK
Package Description
3

Version Downloads Last updated
8.0.1 112 03/26/2024
8.0.0 43 03/25/2024
7.0.2 1 04/26/2024
7.0.1 62 03/26/2024
7.0.0 1 04/26/2024
6.0.11 1 04/26/2024
6.0.10 1 04/26/2024
6.0.9 1 04/26/2024
6.0.8 1 04/26/2024
6.0.7 1 04/26/2024
6.0.6 2 04/06/2024
6.0.5 1 04/26/2024
6.0.0 1 04/26/2024
5.0.9 2 04/26/2024
5.0.8 1 04/26/2024
5.0.7 2 04/05/2024
5.0.6 1 04/26/2024
5.0.5 1 04/26/2024
5.0.4 1 04/26/2024
5.0.3 1 04/26/2024
5.0.2 1 04/26/2024
5.0.1 2 03/31/2024
5.0.0 1 04/26/2024
3.2.11 1 04/26/2024
3.2.10 1 04/26/2024
3.2.9 1 04/26/2024
3.2.8 2 04/03/2024
3.2.7 1 04/26/2024
3.2.6 1 04/26/2024
3.2.5 2 03/31/2024
3.2.4 1 04/26/2024
3.2.3 1 04/26/2024
3.2.2 1 04/26/2024
3.2.1 1 04/26/2024
3.2.0 1 04/26/2024
3.1.14 1 04/26/2024
3.1.13 2 04/26/2024
3.1.12 1 04/26/2024
3.1.11 1 04/26/2024
3.1.10 1 04/26/2024
3.1.9 1 04/26/2024
3.1.8 1 04/26/2024
3.1.7 2 04/12/2024
3.1.6 2 04/04/2024
3.1.5 1 04/26/2024
3.1.4 1 04/26/2024
3.1.3 1 04/26/2024
3.1.2.2 1 04/26/2024
3.1.2.1 2 04/26/2024
3.1.2 1 04/26/2024
3.1.1.8 1 04/26/2024
3.1.1.7 1 04/26/2024
3.1.1.6 2 04/07/2024
3.1.1.5 1 04/26/2024
3.1.1.4 1 04/26/2024
3.1.1.3 2 04/17/2024
3.1.1.2 1 04/26/2024