Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More dependency injection improvements #208

Merged
merged 12 commits into from
Jul 10, 2022

Conversation

Turnerj
Copy link
Member

@Turnerj Turnerj commented Jul 2, 2022

Core Changes:

  • Provide access to IServiceProvider when using the builder pattern
  • Support named cache stacks

I don't really like having so many variations of the service collection extensions but without breaking compatibility, this is what is required for now - might make them hidden from the editor to kinda "gracefully" push developers to the ones with the IServiceProvider, marking the old ones as obsolete in a later version.

Additionally would like to investigate a better method of passing ICacheContextActivator via DI - perhaps as part of the builder?

@Turnerj Turnerj added the enhancement New feature or request label Jul 2, 2022
Turnerj added 7 commits July 3, 2022 21:58
These won't be deprecated yet because they are so new but will be hidden by editors that observe the `EditorBrowsable` attribute.
With the idea to move them to the builder pattern, there is no point adding new overloads that are already hidden.
Turnerj added 2 commits July 10, 2022 16:01
This technically allows a named `ICacheStack<TContext>` to be resolved from an `ICacheStackAccessor` as well as an `ICacheStackAccessor<TContext>`. For an `ICacheStack`, that will throw an exception if tried to be resolved from an `ICacheStackAccessor<TContext>`.
@Turnerj Turnerj merged commit 3d1eea5 into main Jul 10, 2022
@Turnerj Turnerj deleted the more-dependency-injection-improvements branch July 10, 2022 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant