-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Hi. How do we set up the binding for AutoNotifyPropertyChangedInterceptor in a custom module? What I have tried so far:
public class MyViewModel : IMyViewModel {
virtual properties and methods marked with [NotifyOfChanges] attribute
public void OnPropertyChanged
}
public IMyViewModel : IAutoPropertyChanged {
}
*My custom module
public class MyModule : NinjectModule {
Bind(typeof(AutoNotifyPropertyChangedInterceptor<>)).ToSelf() - not working
Bind(typeof(IAutoNotifyPropertyChangedIntercertor<>).To(typeof(AutoNotifyPropertyChangedInterceptor<>)(); - not working
.
.
ViewModel binding works without problems
also, what is correct intercept binding method on the ViewModel itself?
binding.Intercept().With<AutoNotifyPropertyChangedInterceptor>().InOrder(1);
...some other interceptor in chain
or
binding.Intercept().With<IAutoNotifyPropertyChangedInterceptor>
.InOrder(1);
...some other interceptor in chain
I have tried both approaches (binding to interface and concrete type) but it throws an exception during kernel build. Should I use InterceptAttribute for this interceptor instead of binding in a module ?
Any help would be appreciated. Thanks.