Does he have to enable FactorySupportFacility or is it already activated when the container is initiated?
Tuna Toksöz Eternal sunshine of the open source mind. http://devlicio.us/blogs/tuna_toksoz http://tunatoksoz.com http://twitter.com/tehlike On Wed, Jul 1, 2009 at 10:31 PM, "José F. Romaniello" < jfromanie...@gmail.com> wrote: > > Hi Craig, with the first approach I get: > > Castle.MicroKernel.ComponentActivator.ComponentActivatorException: Could > not find a public constructor for the type > ISomeService > in > Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstance(CreationContext > context, Object[] arguments, Type[] signature) > in > Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext > context) > in > Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext > context) > in > Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext > context) > in > Castle.MicroKernel.Lifestyle.SingletonLifestyleManager.Resolve(CreationContext > context) > in > Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context) > in > Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type > service, IDictionary additionalArguments) > in Castle.MicroKernel.DefaultKernel.get_Item(Type service) > in Castle.Windsor.WindsorContainer.Resolve(Type service) > in Castle.Windsor.WindsorContainer.Resolve<T>() > in > > uNHAddIns.Examples.CustomInterceptor.CustomerTest.Product_Raise_Property_Change() > en SomeTest.cs: line 43 > > <about:file%3A%2F%2F16CDF63B-1D9F-49EF-BEBA-F01ADA594882%2Ff%3ACustomerTest.cs%3Fline%3D43%26column%3D1> > > > With the second approach I get: > > Castle.MicroKernel.ComponentRegistrationException: Type ISomeService > is abstract. > As such, it is not possible to instansiate it as implementation of > ISomeService service > in > Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstance(CreationContext > context, Object[] arguments, Type[] signature) > in > Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext > context) > in > Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext > context) > in > Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext > context) > in > Castle.MicroKernel.Lifestyle.SingletonLifestyleManager.Resolve(CreationContext > context) > in > Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context) > in > Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type > service, IDictionary additionalArguments) > in Castle.MicroKernel.DefaultKernel.get_Item(Type service) > in Castle.Windsor.WindsorContainer.Resolve(Type service) > in Castle.Windsor.WindsorContainer.Resolve<T>() > in > > uNHAddIns.Examples.CustomInterceptor.CustomerTest.Product_Raise_Property_Change() > en Some > <about:file%3A%2F%2F16CDF63B-1D9F-49EF-BEBA-F01ADA594882%2Ff%3ACustomerTest.cs%3Fline%3D43%26column%3D1>Test.cs: > line 51 > > <about:file%3A%2F%2F16CDF63B-1D9F-49EF-BEBA-F01ADA594882%2Ff%3ACustomerTest.cs%3Fline%3D51%26column%3D1> > > > Thank you. > > > Craig Neuwirt escribió: > > What error do yo get? > > > > On Wed, Jul 1, 2009 at 2:17 PM, JoseFR <jfromanie...@gmail.com > > <mailto:jfromanie...@gmail.com>> 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 castle-project-users@googlegroups.com To unsubscribe from this group, send email to castle-project-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en -~----------~----~----~----~------~----~------~--~---