Temelie.DependencyInjection
1.0.206
See the version list below for details.
dotnet add package Temelie.DependencyInjection --version 1.0.206
NuGet\Install-Package Temelie.DependencyInjection -Version 1.0.206
<PackageReference Include="Temelie.DependencyInjection" Version="1.0.206" />
<PackageVersion Include="Temelie.DependencyInjection" Version="1.0.206" />
<PackageReference Include="Temelie.DependencyInjection" />
paket add Temelie.DependencyInjection --version 1.0.206
#r "nuget: Temelie.DependencyInjection, 1.0.206"
#:package Temelie.DependencyInjection@1.0.206
#addin nuget:?package=Temelie.DependencyInjection&version=1.0.206
#tool nuget:?package=Temelie.DependencyInjection&version=1.0.206
Temelie.DependencyInjection
Attribute-based service registration for Microsoft.Extensions.DependencyInjection. Mark classes with [Export...] attributes, and Temelie.DependencyInjection.SourceGenerator generates the registrations at compile time, with no reflection or assembly scanning at runtime.
dotnet add package Temelie.DependencyInjection
Attributes
| Attribute | Registers as |
|---|---|
[ExportTransient(typeof(IService))] |
AddTransient |
[ExportScoped(typeof(IService))] |
AddScoped |
[ExportSingleton(typeof(IService))] |
AddSingleton |
[ExportProvider(typeof(IService))] |
AddTransient, keeping every implementation; resolve them with IEnumerable<IService> |
[ExportHostedService] |
AddHostedService<T>() |
[ExportStartupConfiguration] |
A startup step (IStartupConfiguration) |
Each export attribute takes the service type in its constructor and supports these properties:
Type: the implementation to register. Defaults to the attributed class.Priority: how competing registrations are resolved. When several non-provider exports target the same service type, the one with the lowestPrioritywins. The default isint.MaxValue, so you can replace any library default by exporting your own implementation with a lowerPriority.
[ExportTransient(typeof(IClock))]
public class SystemClock : IClock { ... }
[ExportProvider(typeof(IChangeTrackingSourceProvider))]
public class MyChangeSource : IChangeTrackingSourceProvider { ... }
[ExportTransient(typeof(IClock), Priority = 1)] // replaces SystemClock
public class FixedClock : IClock { ... }
Startup configuration
IStartupConfiguration lets a library contribute configuration sources, services, and post-build setup:
[ExportStartupConfiguration(Priority = 10)]
public class DatabaseStartup : IStartupConfiguration
{
public IConfigurationBuilder Configure(IConfigurationBuilder builder) => builder.AddJsonFile("database.json", optional: true);
public IServiceCollection Configure(IServiceCollection services, IConfiguration configuration) =>
services.AddDbContextFactory<MyDbContext>();
public IServiceProvider Configure(IServiceProvider provider) => provider;
}
Startup configurations need a parameterless constructor and run in ascending Priority order. See the source generator for how to run them.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.14)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.14)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Temelie.DependencyInjection:
| Package | Downloads |
|---|---|
|
Temelie.Database.Services
Package Description |
|
|
Temelie.Repository
Package Description |
|
|
Temelie.Repository.EntityFrameworkCore
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.207 | 50 | 11/7/2026 |
| 1.0.206 | 45 | 11/7/2026 |
| 1.0.205 | 46 | 11/7/2026 |
| 1.0.204 | 49 | 11/7/2026 |
| 1.0.202 | 4,179 | 10/13/2026 |
| 1.0.201 | 7,562 | 8/28/2026 |
| 1.0.200 | 222 | 8/26/2026 |
| 1.0.199 | 138 | 8/21/2026 |
| 1.0.196 | 97 | 8/21/2026 |
| 1.0.195 | 96 | 8/21/2026 |
| 1.0.194 | 2,041 | 8/19/2026 |
| 1.0.193 | 76 | 8/12/2026 |
| 1.0.192 | 21,962 | 7/21/2026 |
| 1.0.191 | 4,183 | 7/13/2026 |
| 1.0.190 | 1,037 | 7/9/2026 |
| 1.0.189 | 23,641 | 2/18/2026 |
| 1.0.188 | 75 | 2/13/2026 |
| 1.0.187 | 184 | 11/21/2025 |
| 1.0.186 | 4,782 | 11/20/2025 |
| 1.0.185 | 109 | 11/20/2025 |