private async void OnStudioWindowCreated(StudioWindowCreatedNotificationEvent e) { var domanService = new DomainService(); var termTypeService = new TermTypeService(); await domanService.GetDomains(); await termTypeService.GetTermTypes(); }
public SettingsViewModel(SettingsModel providerSettings, IIateSettingsService settingsService) { _domains = new ObservableCollection <DomainModel>(); _termTypes = new ObservableCollection <TermTypeModel>(); _termTypeService = new TermTypeService(); _domainService = new DomainService(); _settingsService = settingsService; ProviderSettings = new SettingsModel { Domains = new List <DomainModel>(), TermTypes = new List <TermTypeModel>() }; LoadDomains(); LoadTermTypes(); SetFieldsSelection(providerSettings); }
public async void Execute() { Log.Setup(); Logger.Info("-->IATE Application Initializer"); InitializeHttpClientSettings(); //If IATE service is unavailable an error will be thrown in Studio, and studio will shut down without try/catch try { Logger.Info("-->Try to get domains"); var domainService = new DomainService(); var termTypeService = new TermTypeService(); await domainService.GetDomains(); await termTypeService.GetTermTypes(); } catch (Exception e) { Logger.Error(e); } }