private async void OnStudioWindowCreated(StudioWindowCreatedNotificationEvent e)
        {
            var domanService    = new DomainService();
            var termTypeService = new TermTypeService();
            await domanService.GetDomains();

            await termTypeService.GetTermTypes();
        }
예제 #2
0
        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);
            }
        }