Hi -
I'm having difficulty with the following code to register interceptors
IoC.Container.Register(AllTypes.Pick().
FromAssembly(Assembly.Load("myAssembly))
.If(t =>
typeof(IPresenter).IsAssignableFrom(t) && !t.IsAbstract)
.Configure(c =>
c.Interceptors(InterceptorReference.ForType<NotifyPropertyChangedInterceptor>()).Last/
Anywhere
.LifeStyle
.Is(LifestyleType.Transient)
)
.Unless((t =>
typeof(IChildViewModel<>).IsAssignableFrom(t))));
public class MyPresenter : Presenter { ... }
public class Presenter : INotifyPropertyChanged { ... }
When I have a Proxy to my MyPresenter object it seems that the
registration has only registered the interceptor on the Base type and
not the MyPresenter type, and nothing is being intercepted on the
MyPresenterType.
I'm not sure what Last and Anywhere Mean, but would really appreciate
if anyone could suggest how to make the interception work as I want.
Thanks,
Chris
--
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en.