I think that this is because you are using the without target.You can redirect the calls in the interceptor, though.
On Thu, Sep 10, 2009 at 8:26 AM, James Curran <[email protected]>wrote: > > I think this may be a bug, but I figure I'll run it by you guy first. > > public interface IDir > { > [FixedField(0, 20)] > DateTime ModDate { get; } > > [FixedField(29, 9)] > int Size { get; } > > [FixedField(38, 40)] > string Name { get; } > } > > I'm building a proxy that implements those properties. This basically > works. > > however, I also have a concrete class: > > public class Row : IRow {} > > implementation isn't important. I want to add this as a mixin: > > var textFileInterceptor = new TextFileInterceptor(); > var options = new ProxyGenerationOptions(new > TextFileProxyGenerationHook()) { Selector = _selector }; > options.AddMixinInstance(new Row()); > var proxy = _generator.CreateInterfaceProxyWithoutTarget(typeof(IDir), > null, > options, textFileInterceptor); > return (Dir) proxy; > > Ok, the problem is that CreateInterfaceProxyWithoutTarget separates > the IRow interface from the Row object, and adds it to the list of > interfaces to proxy along with IDir. When it tries to proxy the > members of those interfaces, TextFileInterceptor specifically does not > provide implementation for the members of IRow. It then throws an > exception due to the lack of implementation for those members, > ignoring that fact that there's a perfectly good implementation > provided in the mixed-in object. > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
