Using Caliburn.Micro 2.0.1, I've edited AppBootStrapper.cs to inject a service of mine and it's working, but I was wondering if there's a way to automatically inject a mock version of my service during design time like you can with MVVM Light?
E.g.
protected override void Configure()
{
_container = new SimpleContainer();
_container.PerRequest<MainViewModel>();
_container.Instance<IWindowManager>(new WindowManager());
_container.Singleton<IEventAggregator, EventAggregator>();
// like this...
if (IsInDesignMode)
{
_container.Instance<IMyService>(new MyServiceMock());
}
else
{
_container.Instance<IMyService>(new MyService());
}
}