in your sample: _container.Resolve<LogManager> you should resolve by the service type (probably ILogManager) and not by implementation
Ken Egozi. http://www.kenegozi.com/blog http://www.delver.com http://www.musicglue.com http://www.castleproject.org http://www.idcc.co.il - הכנס הקהילתי הראשון למפתחי דוטנט - בואו בהמוניכם On Wed, Jun 15, 2011 at 11:43 AM, Marvin <[email protected]>wrote: > Hallo @ all! > I am a newbie at castle windsor and have problems to resolve an > object. > > My code: > ... > ... > //this woks > foreach (String asm in assemblies) > { > > > _container.Register(AllTypes.FromAssemblyNamed(asm).BasedOn<ILogManager>().If(t > => > > t.FullName.Contains(xmlConfig.loggerName))); > } > //after that loop, there is only one component registered (Name: > "TextLogManager") > > //Now I try to resolve: > ILogManager logger = _container.Resolve<LogManager>(); > //This does not work. There occours the exception: > //"No component for supporting the service ILogManager was found" > //Where is the mistake?? > > // Thanks for the help... > // Marvin > > -- > 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. > > -- 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.
