public IConstModelsService GetConstModelsService() { if (constModelsService == null) { constModelsService = new SimpleConstModelsService(); } return(constModelsService); }
private CommonConstViewModel(IConstModelsService constModelsService) { this.constModelsService = constModelsService; //Task.Run(() => //{ try { this.FamousPersonTypes = constModelsService.FamousPersonTypes; this.HistoryEventTypes = constModelsService.HistoryEventTypes; this.Provinces = constModelsService.Provinces; this.Nations = constModelsService.Nations; } catch (ApiErrorException e) { MessageBox.Show(e.Message); } // }); }