Repository navigation
.NET 8 + Hosted Services
New in this version
- .NET 8
- Streamlined Attribute usage
- Support for hosted services
Attribute Changes
More constructors were added to the AutoDIRegisterAttribute attribute to make usage easier. You no longer have to define the service type when using a custom registration function.
Hosted Services
Hosted services can now be registered automatically using the AutoDIHostedServiceAttribute attribute.
For this to work, your class must implement Microsoft.Extensions.Hosting.IHostedService or an exception will be thrown.