Skip to content

.NET 8 + Hosted Services

Choose a tag to compare

@AyrA AyrA released this 28 Apr 20:36
· 3 commits to master since this release

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.