cspray/annotated-container

Refactor functional API to return definitions and not be DefinitionProviderContext aware

Closed this issue · 0 comments

Currently the functional API is a bit clunky and requires a DefinitionProviderContext be passed as the first argument. This is largely an artifact of dealing with an immutable data structure, the ContainerDefinitionBuilder, and needing to provide a solution for that. The solution provided in 2.x is less than ideal.

In 3.x the DefinitionProviderContext has been updated to expose more appropriate methods for adding the different types of definitions. This updated will allow us to change the functional API into one that's a bit easier to reason about. The functions should returns definitions that get added via the DefinitionProviderContext.