public MainWindow() { InitializeComponent(); _activePages = new HashSet <Page>(); _dataManager = new DataManager <AppData>("prefs.json"); try { _appData = _dataManager.Load(); } catch (Exception ex) { MessageHelper.Error(ex.Message); Close(); } _context = CreateContext(); _pulse = new Pulse(_context, () => StartInspector()); _inspector = new InspectorService(); Loaded += MainWindow_Loaded; StateChanged += MainWindow_StateChanged; Closing += MainWindow_Closing; Start(); }
public static string GetOrgFunction(string uuid, bool raw) { InspectorService service = new InspectorService(); if (raw) { return(service.ReadFunctionRaw(uuid)); } Function orgFunction = service.ReadFunctionObject(uuid); return(ParserUtils.SerializeObject(orgFunction)); }
public static string GetOrgUnit(string uuid, bool raw) { InspectorService service = new InspectorService(); if (raw) { return(service.ReadOURaw(uuid)); } OU orgUnit = service.ReadOUObject(uuid); return(ParserUtils.SerializeObject(orgUnit)); }
public static string GetAddress(string uuid, bool raw) { InspectorService service = new InspectorService(); if (raw) { return(service.ReadAddressRaw(uuid)); } AddressHolder address = service.ReadAddressObject(uuid); return(ParserUtils.SerializeObject(address)); }
public static string GetPerson(string uuid, bool raw) { InspectorService service = new InspectorService(); if (raw) { return(service.ReadPersonRaw(uuid)); } Person person = service.ReadPersonObject(uuid); return(ParserUtils.SerializeObject(person)); }
public static string GetUser(string uuid, bool raw) { InspectorService service = new InspectorService(); if (raw) { return(service.ReadUserRaw(uuid)); } User user = service.ReadUserObject(uuid); return(ParserUtils.SerializeObject(user)); }
public Controller(string cvr, string orgUuid, RichTextBox log) { this.log = log; // overwrite settings from registry - this must happen before calling Init() as that will start fetching tokens OrganisationRegistryProperties properties = OrganisationRegistryProperties.GetInstance(); OrganisationRegistryProperties.Municipality = cvr; properties.MunicipalityOrganisationUUID[OrganisationRegistryProperties.GetMunicipality()] = orgUuid; Initializer.Init(); this.inspectorService = new InspectorService(); var config = new TemplateServiceConfiguration(); config.CachingProvider = new DefaultCachingProvider(t => { }); var service = RazorEngineService.Create(config); Engine.Razor = service; }