Export generic interface with constraint(s)
mcdis opened this issue · comments
MCDis commented
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>
Ian Johnson commented
Hi @mcdis,
You should be able to do When.MeetsCondition((strategy, staticContext) => /* inspect T using reflection here */)