can you provide a failing test? I'm not sure I understand the scenario 2 here
2010/9/24 Kam <[email protected]> > Hi, > > I'm currently using IProxyGenerationHook to control which methods to > exclude for proxy generation for a given interface. My current > hierarchy of classes and interfaces is the following: > > Class_A implements interfaces Interface_A and Interface_Z > Class_B inherits Class_A and also implements interfaces Interface_B > Interface_B inherits Interface_Z. > > I created a proxy to interface Interface_B with a target instance of > Class_B, and gave it Interface_Z as additional interface to include in > the proxy generation process. > > I use custom attributes on methods/properties to mark for exclusion. > i.e. [NonProxied]. > > Scenario 1: > If I mark a method belonging to Interface_B, the hook will exclude it > and any calls through the proxy to that marked method will reach the > target object's method without interception. (Behaviour I expected). > > Scenario 2: > If I mark a method belonging to Interface_Z and cast my proxy instance > to (Interface_Z) to make a call to the marked method, the call will > not reach its target object. From a debugger point of view, attempting > to step-in won't do anything. The execution proceeds to the next line > without interception nor forwarding to the real implementation. I get > this behaviour even without attaching the debugger. (Expected the call > to reach the target instance's method implementation without > interceptors). > > To summarize, using proxy generation hook to exclude seems to work > only for first level interface methods and properties but not for > inherited interfaces with marked methods or properties. > > Perhaps this is not supported or I'm just missing something? Has > anyone else experienced a similar scenario? > > Thanks in advance! > > -- > 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]<castle-project-users%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/castle-project-users?hl=en. > > -- 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.
