Repository navigation
Releases: I-RzR-I/AppInitDefinitionDecorate
Release list
v2.0.0.7683
What's Changed
Breaking changes from 1.x:
-
The
IInitDefinitionDecorateinterface is now composed ofIDefinitionMetadata,IServiceDefinition, andIApplicationDefinition. Implementations that previously relied on the single interface are source-compatible if they extendInitDefinitionDecorate; direct implementations need the new split. -
ServiceConfigurationandApplicationConfigurationoverloads that take rawIServiceCollection/IApplicationBuilderare marked[Obsolete]. They still work via a bridge. Migrate to the context-based overloads (ServiceConfigurationContext,ApplicationConfigurationContext). -
DefinitionRegistry(internal) is now a singleton accumulator; multipleAddDefinitionDecoratescalls 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; asyncAddDefinitionDecoratesAsync/UseDefinitionDecoratesAsync. -
Minimal-hosting extensions:
WebApplicationBuilder.AddDefinitionDecorates/WebApplication.UseDefinitionDecorates(requires net6.0+). -
Config-driven enable/disable:
DefinitionDecorates:{Type.FullName}:Enabledinappsettings.jsonoverridesIsDecorationEnable. -
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 ofInitializeOrder. -
xUnit test suite covering Discovery, Toggle, Ordering, DI behaviour, and async paths.
Migration from 1.x:
- Replace
ServiceConfiguration(IServiceCollection)overrides withServiceConfiguration(ServiceConfigurationContext). - Replace
ApplicationConfiguration(IApplicationBuilder, ...)overrides withApplicationConfiguration(ApplicationConfigurationContext). - Update
Startup.ConfigureServicesto passconfigurationif you want config-driven toggling. - Optionally adopt
WebApplicationBuilder/WebApplicationextensions for .NET 6+ projects.
Full Changelog: v1.1.3.0753...v2.0.0.7683
v1.1.3.0753
Merge pull request #5 from I-RzR-I/fix/WrongModification Fix wrong modification.
v1.1.1.553
Merge pull request #3 from I-RzR-I/feature/IndependentInject Clean up code. Reorganize project structure. Add new extension for ap…