Configure container with StaticFactoryExtension

Oct 23, 2008 at 7:26 PM

How do I configure a container in a config-file to make use of the StaticFactoryExtensions? I Want to register a factory and a factorydelegate.

I'm currently doing this in code using the code below.


container.Configure<IStaticFactoryConfiguration>().RegisterFactory<NHibDAC>(new FactoryDelegate(c => c.Resolve<NHibContext>().CreateNewNHibDAC()));


Oct 24, 2008 at 12:39 AM
You can't. There's no way to specify a delegate definition in the config file.