Skip to content

Releases: AyrA/AutoDI

Streamlined service registration

Choose a tag to compare

@AyrA AyrA released this 20 Jul 03:02

New AutoDIHostedSingletonService attribute

This attribute registers a service as a singleton and hosted service simultaneously. Both registrations will use the same instance.

This replaces the need for custom registration code whenever a service is to be used as a hosted service as well as a singleton at the same time.

New filters

You can now define filters for each AutoDI* attribute. The filters are compared against those in AutoDIExtensions.FilterList to dynamically decide which service to load and which to skip. Filters can be used to either explicitly include, or explicitly exclude services.
Services without a filter are always loaded to retain existing behavior. The details on how the filters work is explained in the readme file.

Removed: throwOnNoneType argument, and AutoDIType.None enum value

These are no longer needed and can be replaced using the new filter system

.NET 8 + Hosted Services

Choose a tag to compare

@AyrA AyrA released this 28 Apr 20:36

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.

Added support for custom registration functions

Choose a tag to compare

@AyrA AyrA released this 03 Jan 23:12

You can now specify your own registration function in the attribute to override the defaults. See readme file for details.

This change should not interfer with existing installations of v2.0 or later.

Better assembly searcher

Choose a tag to compare

@AyrA AyrA released this 06 Dec 18:59

The assembly type searcher has been improved. It can now search assemblies that are referenced, but not yet loaded.
To stop it from loading the entire .NET framework into memory, internal assemblies starting with "Microsoft." or "System." are excluded by default.

Multiple Attribute support added

Choose a tag to compare

@AyrA AyrA released this 06 Dec 17:31

This version adds the ability for you to specify the injection attribute multiple times on the same type.

Doing so will inject the type multiple times. You can use this to register a type with multiple interfaces for example.

Signed package

Choose a tag to compare

@AyrA AyrA released this 05 Dec 12:01

No changes in code. But the package is signed now

First publish

Choose a tag to compare

@AyrA AyrA released this 05 Dec 11:47
v1.0.0

Change project to allow publishing to nuget