Thanks Patrick, How can I extract constructor arguments. I want to target class gets supplied to StructureMap Type interceptor and some how there I would have to extract the constructor args to non generic method you mentioned below. Is that achievable?
Rusty On Friday, August 24, 2012 9:48:45 AM UTC-5, Patrick Steele wrote: > > It looks like the non-generic version of CreateClassProxyWithTarget > includes an overload where you can supply ctor arguments. > > --- > Patrick Steele > http://weblogs.asp.net/psteele > > > On Fri, Aug 24, 2012 at 1:14 AM, Rumba1982 <[email protected]<javascript:>> > wrote: > > This is just an example, I have some classes that don't have constructor > no > > parameters, but overloaded constructors. How can I create proxy for > > something like this below. > > > > HelloWorld target = new HelloWorld("SomeValue"); > > target.Name = "Hello"; > > > > target = proxy.CreateClassProxyWithTarget<HelloWorld>(target, new > > HelloInterceptor()); > > > > Can not instantiate proxy of class: ConsoleApplication1.HelloWorld. > > Could not find a parameterless constructor. > > > > Thanks > > Rusty > > > > -- > > You received this message because you are subscribed to the Google > Groups > > "Castle Project Users" group. > > To view this discussion on the web visit > > https://groups.google.com/d/msg/castle-project-users/-/VYoI0ICWaE4J. > > To post to this group, send email to > > [email protected]<javascript:>. > > > To unsubscribe from this group, send email to > > [email protected] <javascript:>. > > 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 view this discussion on the web visit https://groups.google.com/d/msg/castle-project-users/-/YKw95DFcDGEJ. 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.
