Autofac, starting components
Some of my components need to be started after all of them have been created. This is quite easy to solve with Autofac. The components simply implement this interface:
public interface IStartable
{
void Start();
}
Then all I need to do is to invoke the start method:
Components.Resolve<IEnumerable<IStartable>>().Each(c => c.Start());
Note that I resolve IEnumerable