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

Tenant Specific Bindings for the IoC container #256

Open
smithmx opened this issue Sep 6, 2019 · 0 comments
Open

Tenant Specific Bindings for the IoC container #256

smithmx opened this issue Sep 6, 2019 · 0 comments

Comments

@smithmx
Copy link
Contributor

smithmx commented Sep 6, 2019

We should be able to register implementations on a per tenant basis.

This will have to be in addition to the normal "lifetime" scopes.

So if I have an InstancePerExecutionContext() which controls the lifetime of instances of the implementation, InstancePerExecutonContext().PerTenant("9fd8188e-987f-4977-a813-fab79c719e9c") would decide that not only did we have a new instance of IFoo per execution context, it might be MyFoo for Tenant1 and YourFoo for Tenant2.

We'd obviously need a default implementation for other non-specified tenants.

Maybe something like InstancePerExecutionContext((ec) => //do some check with the execution context); might be a better more generic scope?

┆Issue is synchronized with this Asana task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant