CAB Services collection empty

Topics: CAB & Smart Client Software Factory
Jun 15, 2007 at 10:09 AM
Hi there,

I'm new to CAB. I have created a module with a service. I added the attribute Service(typeof(IContactService))
In my controller I have the following servicedepency property

private IContactService _contactService;
ServiceDependency
public IContactService ContactService
{
set { _contactService = value; }
}

When I try to use the service, it keeps getting empty. What am I missing here?

Greetz,
G
Jun 29, 2007 at 7:52 PM
Hi!

It sounds like you are trying to inject the service before it is created. To see if this is what's happening, you could add a breakpoint in your service's constructor and see if it ever gets called (and if so, whether it's called before or after when you are trying to get it).

Maybe this you will find this thread helpful: http://www.codeplex.com/smartclient/Thread/View.aspx?ThreadId=11556

Hope it helps!

Luciano G. Panaro
http://staff.southworks.net/lpanaro