Test WPF Desktop App with Caliburn And RestSharp

This commit is contained in:
2019-02-26 01:26:03 +01:00
parent 35bd2890ed
commit e8fd116eab
38 changed files with 996 additions and 30 deletions

View File

@@ -0,0 +1,49 @@
using System;
using System.Collections.Generic;
using System.Windows;
using Caliburn.Micro;
using LaDOSE.DesktopApp.Services;
using LaDOSE.DesktopApp.ViewModels;
namespace LaDOSE.DesktopApp
{
public class Bootstrapper : BootstrapperBase
{
private SimpleContainer container;
public Bootstrapper()
{
Initialize();
}
protected override void Configure()
{
container = new SimpleContainer();
container.Singleton<IWindowManager, WindowManager>();
container.PerRequest<ShellViewModel>();
container.Singleton<RestService>();
}
protected override void OnStartup(object sender, StartupEventArgs e)
{
DisplayRootViewFor<ShellViewModel>();
}
protected override object GetInstance(Type service, string key)
{
return container.GetInstance(service, key);
}
protected override IEnumerable<object> GetAllInstances(Type service)
{
return container.GetAllInstances(service);
}
protected override void BuildUp(object instance)
{
container.BuildUp(instance);
}
}
}