I want to inject DispatcherNotifiedObservableCollection into (and only into) all ViewModels (located in MyProject.ViewModels) as ObservableCollection.
With Ninject I can accomplish this with:
Bind(typeof(ObservableCollection<>))
.To(typeof(DispatcherNotifiedObservableCollection<>))
.When(context => context.ParentContext.Binding
.Service.Namespace == "MyProject.ViewModels");
I've learned from Nicholas Blumhardt: Autofac vs Ninject contextual binding?
that Autofac does not provide this functionality, but some workaround could be applied.
Thanks!
(sorry for my English)
Edit 1: Changed title for better description.
Edit 2, 3: Changed contents and title for better description.