Aiursoft.Scanner 9.0.2
Aiursoft Scanner
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
|
236 |
Aiursoft.Probe.SDK
Package Description
|
11 |
Aiursoft.Observer.SDK
Package Description
|
11 |
Aiursoft.Directory.SDK
Nuget package of 'SDK' provided by Aiursoft
|
10 |
Aiursoft.SDK
The base class, tools and extends for Aiursoft web apps.
|
10 |
Aiursoft.SDK
All Aiursoft API implementations for all apps which need to integrate with Aiursoft.
|
10 |
Aiursoft.Observer.SDK
Package Description
|
10 |
Aiursoft.Probe.SDK
Package Description
|
9 |
Aiursoft.Directory.SDK
Nuget package of 'SDK' provided by Aiursoft
|
9 |
Aiursoft.Directory.SDK
Package Description
|
9 |
Aiursoft.SDK
The base class, tools and extends for Aiursoft web apps.
|
9 |
Kahla.SDK
The base class, interfaces, services and bot framework for Aiursoft Kahla.
|
9 |
Aiursoft.SDK
All Aiursoft API implementations for all apps which need to integrate with Aiursoft.
|
9 |
.NET 9.0
- Aiursoft.Scanner.Abstractions (>= 9.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.1)
Version | Downloads | Last updated |
---|---|---|
9.0.2 | 32 | 01/15/2025 |
9.0.1 | 93 | 12/29/2024 |
8.0.2 | 585 | 10/09/2024 |
8.0.1 | 580 | 03/26/2024 |
8.0.0 | 134 | 03/25/2024 |
7.0.2 | 14 | 04/26/2024 |
7.0.1 | 236 | 03/26/2024 |
7.0.0 | 11 | 04/26/2024 |
6.0.11 | 14 | 04/26/2024 |
6.0.10 | 7 | 04/26/2024 |
6.0.9 | 7 | 04/26/2024 |
6.0.8 | 5 | 04/26/2024 |
6.0.7 | 3 | 04/26/2024 |
6.0.6 | 7 | 04/06/2024 |
6.0.5 | 5 | 04/26/2024 |
6.0.0 | 5 | 04/26/2024 |
5.0.9 | 5 | 04/26/2024 |
5.0.8 | 5 | 04/26/2024 |
5.0.7 | 6 | 04/05/2024 |
5.0.6 | 5 | 04/26/2024 |
5.0.5 | 5 | 04/26/2024 |
5.0.4 | 6 | 04/26/2024 |
5.0.3 | 5 | 04/26/2024 |
5.0.2 | 4 | 04/26/2024 |
5.0.1 | 4 | 03/31/2024 |
5.0.0 | 5 | 04/26/2024 |
3.2.11 | 5 | 04/26/2024 |
3.2.10 | 5 | 04/26/2024 |
3.2.9 | 5 | 04/26/2024 |
3.2.8 | 6 | 04/03/2024 |
3.2.7 | 5 | 04/26/2024 |
3.2.6 | 5 | 04/26/2024 |
3.2.5 | 6 | 03/31/2024 |
3.2.4 | 5 | 04/26/2024 |
3.2.3 | 5 | 04/26/2024 |
3.2.2 | 5 | 04/26/2024 |
3.2.1 | 5 | 04/26/2024 |
3.2.0 | 5 | 04/26/2024 |
3.1.14 | 5 | 04/26/2024 |
3.1.13 | 5 | 04/26/2024 |
3.1.12 | 4 | 04/26/2024 |
3.1.11 | 4 | 04/26/2024 |
3.1.10 | 6 | 04/26/2024 |
3.1.9 | 4 | 04/26/2024 |
3.1.8 | 5 | 04/26/2024 |
3.1.7 | 5 | 04/12/2024 |
3.1.6 | 6 | 04/04/2024 |
3.1.5 | 7 | 04/26/2024 |
3.1.4 | 7 | 04/26/2024 |
3.1.3 | 4 | 04/26/2024 |
3.1.2.2 | 6 | 04/26/2024 |
3.1.2.1 | 6 | 04/26/2024 |
3.1.2 | 4 | 04/26/2024 |
3.1.1.8 | 4 | 04/26/2024 |
3.1.1.7 | 4 | 04/26/2024 |
3.1.1.6 | 6 | 04/07/2024 |
3.1.1.5 | 7 | 04/26/2024 |
3.1.1.4 | 6 | 04/26/2024 |
3.1.1.3 | 7 | 04/17/2024 |
3.1.1.2 | 6 | 04/26/2024 |