DependencyAttribute or ServiceDependencyAttribute

Topics: CAB & Smart Client Software Factory
Nov 3, 2005 at 9:30 PM
originally posted by: mamu300B


Can anybody tell me on when to use "DependencyAttribute" or "ServiceDependencyAttribute"?
In the samples that come with CAB CTP2 you can see the usage of ServiceDependencyAttribute for some controllers and DependencyAttribute for their base class.

BTW: Is there a larger sample for CAB CTP2? Maybe the one you can see as a screen shot on page 4 in the "Introduction to the CAB" pdf document?

Thanks in advance
Nov 4, 2005 at 4:51 AM
originally posted by: BradWilsonMSFT

I will look at the samples today to make sure they are all using ServiceDependency.

The Dependency attribute is a general purpose attribute from ObjectBuilder. When using CAB, you should use the ServiceDependency and ComponentDependency attributes instead, as these better line up with the ways CAB uses ObjectBuilder internally.