I have created simple factory:
public interface ICommandFactory
{
ICommand CreateCommand(string componentName);
}
Implemented using Typed Factory feature from Windsor:
Container.AddFacility<TypedFactoryFacility>();
Container.Kernel.Register(Component.For<ICommandFactory>().AsFactory());
also i am using subresolver:
Container.Kernel.Resolver.AddSubResolver(new CommandResolverByName(Container.Kernel, null));
Unfortunately when i try to use typed factory for my interface it doesn't use custom subresolver. Does anyone one know this problem or is it just the way typed factory works :>
Thanks in advance
Jakub
它在2.5版中适用。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.