Hi,
Ensure your IStartable implementations are decorated with the appropriate export attribute, which in this case would be:
You could also define an abstract Startable class that implements the IStartable and have all Startable (IStartable implementations) classes derive from that abstract base class which would allow your Startables to inherit the Start() method from the base class and not have to explicitly define that method for each implementation of IStartable.
It's me Tobias btw, lost my old password for that account.
Ensure your IStartable implementations are decorated with the appropriate export attribute, which in this case would be:
[Export(typeof(IStartable)]
public class Car : IStartable
{
...
}
This way the container will be able to import them (the IStartable's) when the container initializes.You could also define an abstract Startable class that implements the IStartable and have all Startable (IStartable implementations) classes derive from that abstract base class which would allow your Startables to inherit the Start() method from the base class and not have to explicitly define that method for each implementation of IStartable.
It's me Tobias btw, lost my old password for that account.