ServiceDependency question

Topics: CAB & Smart Client Software Factory
Oct 22, 2005 at 2:17 AM
originally posted by: CharlesGamble

Hi,

I am trying to use ServiceDependency attribute on CAB October release to load a service in my controller class, the service and the controller exist in another module that is used by the main shell application. However it is failing to find the service.
What exactly do I need to do to get this to work?
For example, how do the services get loaded by the Quickstart ModuleLoader solution?
I am unclear as to how this works..

Any help is much appreciated,
Charles Gamble.
Oct 22, 2005 at 6:07 AM
originally posted by: sslysaght

I haven't tried this in CTP2, but in CTP1 if the services are in the App.config file, the default startup (FileCatalogReaderService and ModuleLoader) will load the services


In App.config

<CompositeUI>
<services>
<add
serviceType="ModuleA.ServiceA, ModuleA"
instanceType="ModuleA.ServiceA, ModuleA"
.....


I did have a problem with ServiceDependency if a service in one module depended on a service in another module. The ServiceDependency seems
to work only within a module?
Oct 22, 2005 at 11:55 PM
originally posted by: CharlesGamble

Thanks for the help.

There is no app.config file for the ModuleLoader quickstart, so I am still unsure as to how it loads the service and why it's not working for my test application.

Charles.
Oct 25, 2005 at 6:11 AM
originally posted by: CharlesGamble

I got this working. I had not set the ServiceDependency to be the Interface instead of the Class instance of the service.

Charles.