Skip to content

Releases: I-RzR-I/AppInitDefinitionDecorate

v2.0.0.7683

Choose a tag to compare

@I-RzR-I I-RzR-I released this 08 Jun 19:04
53e0004

What's Changed


Breaking changes from 1.x:

  • The IInitDefinitionDecorate interface is now composed of IDefinitionMetadata, IServiceDefinition, and IApplicationDefinition. Implementations that previously relied on the single interface are source-compatible if they extend InitDefinitionDecorate; direct implementations need the new split.

  • ServiceConfiguration and ApplicationConfiguration overloads that take raw IServiceCollection / IApplicationBuilder are marked [Obsolete]. They still work via a bridge. Migrate to the context-based overloads (ServiceConfigurationContext, ApplicationConfigurationContext).

  • DefinitionRegistry (internal) is now a singleton accumulator; multiple AddDefinitionDecorates calls accumulate rather than shadow, this may change registration order if you relied on last-call-wins.

  • Context objects (ServiceConfigurationContext, ApplicationConfigurationContext) carrying all optional parameters in a single argument; single method dispatch eliminates the overload-pick trap.

  • Async hooks: ServiceConfigurationAsync / ApplicationConfigurationAsync; async AddDefinitionDecoratesAsync / UseDefinitionDecoratesAsync.

  • Minimal-hosting extensions: WebApplicationBuilder.AddDefinitionDecorates / WebApplication.UseDefinitionDecorates (requires net6.0+).

  • Config-driven enable/disable: DefinitionDecorates:{Type.FullName}:Enabled in appsettings.json overrides IsDecorationEnable.

  • Assembly/type-filter scanning): AddDefinitionDecorates(IServiceCollection, IConfiguration, Func<Type,bool>, params Assembly[]).

  • Topological ordering via [DependsOn]: annotate a definition class to guarantee it runs after its dependency, regardless of InitializeOrder.

  • xUnit test suite covering Discovery, Toggle, Ordering, DI behaviour, and async paths.

Migration from 1.x:

  1. Replace ServiceConfiguration(IServiceCollection) overrides with ServiceConfiguration(ServiceConfigurationContext).
  2. Replace ApplicationConfiguration(IApplicationBuilder, ...) overrides with ApplicationConfiguration(ApplicationConfigurationContext).
  3. Update Startup.ConfigureServices to pass configuration if you want config-driven toggling.
  4. Optionally adopt WebApplicationBuilder / WebApplication extensions for .NET 6+ projects.

Full Changelog: v1.1.3.0753...v2.0.0.7683

v1.1.3.0753

Choose a tag to compare

@I-RzR-I I-RzR-I released this 09 Oct 22:34
015a57a
Merge pull request #5 from I-RzR-I/fix/WrongModification

Fix wrong modification.

v1.1.1.553

Choose a tag to compare

@I-RzR-I I-RzR-I released this 09 Oct 07:39
eefd7da
Merge pull request #3 from I-RzR-I/feature/IndependentInject

Clean up code. Reorganize project structure. Add new extension for ap…