private static void RegisterAllServices() { SimpleIoC.RegisterSingleton <IPageCachingService, PageCachingService>(); SimpleIoC.RegisterSingleton <INavigationService, NavigationService>(); var client = new HttpClient(); SimpleIoC.RegisterInstance <IWebService>(new WebService(client)); }
private static void RegisterAllViewModels() { Assembly currentAssembly = typeof(App).GetTypeInfo().Assembly; var viewModelTypes = currentAssembly.ExportedTypes.Where(t => t.Name.EndsWith("ViewModel")); foreach (var type in viewModelTypes) { if (!type.GetTypeInfo().IsAbstract) { SimpleIoC.RegisterSingleton(type); } } }