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

Export generic interface with constraint(s) #292

Open
mcdis opened this issue Apr 7, 2022 · 1 comment
Open

Export generic interface with constraint(s) #292

mcdis opened this issue Apr 7, 2022 · 1 comment

Comments

@mcdis
Copy link

mcdis commented Apr 7, 2022

Dear Johnson!

Can you tell me if I can export the generic interface given the constraints?

Example:

_.Export(typeof(ConfProvider<>)).As(typeof(IObservable<>).WithConstaints<IMsg>.Lifestyle.Singleton()

I want to bind IObservable<T> where IMsg to ConfProvider<T>

@ipjohnson
Copy link
Owner

Hi @mcdis,

You should be able to do When.MeetsCondition((strategy, staticContext) => /* inspect T using reflection here */)

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

No branches or pull requests

2 participants