Services created with factories

Topics: CAB & Smart Client Software Factory
Mar 8, 2007 at 5:45 PM
Edited Mar 8, 2007 at 5:47 PM
I have services that can be created by a factories (Using EnterpriseLibrary AssemblerBasedCustomFactory).

With the following code we add the services to the Services collection.

public override void AddServices()

IMyService service = MyServiceFactory.CreateMyService();

This works fine. But what I want to do is to configure the service via the CompositeUI/services tag in the app.config.

<add serviceType="MyNamespace.IMyService, MyAssembly" instanceType="?????, ???MyFactoryAssembly" />

Is this possible?