Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sefacan/scrutor.aspnetcore
ASP.NET Core Scrutor extension for automatic registration of classes inherited from IScopedLifetime, ISelfScopedLifetime, ITransientLifetime, ISelfTransientLifetime, ISingletonLifetime, ISelfSingletonLifetime
https://github.com/sefacan/scrutor.aspnetcore
aspnet aspnet-core aspnetcore assembly-scanning best-practices c-sharp csharp dependency-injection dotnet dotnet-core framework scrutor
Last synced: 5 days ago
JSON representation
ASP.NET Core Scrutor extension for automatic registration of classes inherited from IScopedLifetime, ISelfScopedLifetime, ITransientLifetime, ISelfTransientLifetime, ISingletonLifetime, ISelfSingletonLifetime
- Host: GitHub
- URL: https://github.com/sefacan/scrutor.aspnetcore
- Owner: sefacan
- License: mit
- Created: 2020-02-15T19:05:07.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-06-30T10:33:57.000Z (over 2 years ago)
- Last Synced: 2024-10-01T01:59:31.666Z (about 1 month ago)
- Topics: aspnet, aspnet-core, aspnetcore, assembly-scanning, best-practices, c-sharp, csharp, dependency-injection, dotnet, dotnet-core, framework, scrutor
- Language: C#
- Homepage:
- Size: 28.3 KB
- Stars: 17
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Scrutor.AspNetCore
ASP.NET Core [Scrutor](https://github.com/khellang/Scrutor) extension for automatic registration of classes inherited from IScopedLifetime, ISelfScopedLifetime, ITransientLifetime, ISelfTransientLifetime, ISingletonLifetime, ISelfSingletonLifetime
### Build Status
| Build server | Platform | Status |
|-----------------|----------------|-------------|
| Azure CI Pipelines | All |![](https://dev.azure.com/fsefacan/Scrutor.AspNetCore/_apis/build/status/sefacan.Scrutor.AspNetCore?branchName=master) |
| Github Actions | All |![](https://github.com/sefacan/Scrutor.AspNetCore/workflows/.NET%20Core%20CI/badge.svg) |
| Travis CI | Linux |![](https://travis-ci.com/sefacan/Scrutor.AspNetCore.svg?branch=master) |## Installation
Install the [Scrutor.AspNetCore NuGet Package](https://www.nuget.org/packages/Scrutor.AspNetCore).
### Package Manager Console
```
Install-Package Scrutor.AspNetCore
```### .NET Core CLI
```
dotnet add package Scrutor.AspNetCore
```## Usage
```csharp
public void ConfigureServices(IServiceCollection services)
{
//add to the end of the method
services.AddAdvancedDependencyInjection();
}public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
//add to the end of the method
app.UseAdvancedDependencyInjection();
}//usage without constructor classes
var service = ServiceLocator.Context.GetService();
```