I have IRFConfigurationSection which is instanced like this:
(RFConfigurationSection)ConfigurationManager.GetSection("userSettings/ABZReportFactoryServer");
I want to put this call into Windsor castle and make this class singleton. So when I need to instance this RFConfigurationSection class, I’ll like to do it this way.
IWindsorContainer container = new WindsorContainer(new XmlInterpreter());
configSection = container.Resolve<IRFConfigurationSection>();
Is it possible to somehow configure Windsor Castle config to do this?
Would a better approach to use a factory, e.g:
That way, you can add the factory to the container, and resolve an instance of that: