You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: