public void loadSimApplicationConfiguration(SimulationRunningConfig config) { if (config.AppSettings.NetworkSettings == null) throw new NullReferenceException("XMLSimApplication: Unable to load NetworkSettings - null"); NetworkSettings = config.AppSettings.NetworkSettings; if (config.AppSettings.SystemProfile == null) throw new NullReferenceException("XMLSimApplication: Unable to load SystemProfile - null"); SystemProfile = config.AppSettings.SystemProfile; }
public void LoadApplicationData() { //load Database Connection databaseInterface = new DatabaseConnection(); //load Application Settings AppLoader appLoader = new AppLoader(databaseInterface, DATA_SOURCE_STRING); //apploader will create simulation config from database data _simConfig = new SimulationRunningConfig(appLoader.loadAppSettings()); //_simConfig = new SimulationRunningConfig(); //load default hard coded config. //start listening for UDP Messages Task.Factory.StartNew(() => startUdpListener()); }
public SimulationManagementHelper(SimulationRunningConfig config, string tedDatasource) { setSimConfig(config); tedConnectString = tedDatasource; Interface = new DatabaseConnection(); }
public NetworkConnection(SimulationRunningConfig config) { _appConfig = config; }
public void setSimConfig(SimulationRunningConfig config) { if (config == null) throw new NullReferenceException("Simulation Manager: Cannot set Simulation Configuration, the config is null"); _appConfig = config; }