What error do yo get?

On Wed, Jul 1, 2009 at 2:17 PM, JoseFR <[email protected]> wrote:

>
> Is there a way to register a proxy service in the container without
> target. I'm looking for something like this:
>
> container.Register(Component.For<ISomeService>()
>                        .Interceptors(new InterceptorReference(typeof
> (SomeInterceptor)),
>                                           new InterceptorReference
> (typeof(OtherInterceptor)))
>                                          .First);
>
> even I try with:
>
>            container.Register(Component.For<ISomeService>()
>                                                        .UsingFactoryMethod
> (() =>
>                                                {
>                                                    var proxyGen = new
> Castle.DynamicProxy.ProxyGenerator();
>                                                    return (IProduct)
> proxyGen.CreateInterfaceProxyWithoutTarget(
>                                                        typeof
> (ISomeService),
>                                                        new
> SomeInterceptor(),
>                                                        new
> OtherInterceptor());
>                                                }));
>
>
> 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]
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to