public static DATEXIIProcessServiceFactory GetInstance(DATEXIIUpdateService datexIIUpdateService) { if (instance == null) { instance = new DATEXIIProcessServiceFactory(datexIIUpdateService); } return(instance); }
public DATEXIINetworkModelUpdateService(DATEXIIUpdateService datexIIUpdateService) { this.datexIIUpdateService = datexIIUpdateService; logWrapper = new LogWrapper("DATEXIINetworkModelUpdateService"); nwkModelDirectory = ConfigurationManager.AppSettings["rootDirectory"] + ConfigurationManager.AppSettings["nwkModelDirectory"]; nwkModelPath = ConfigurationManager.AppSettings["nwkModelPath"]; }
public static DATEXIIUpdateService GetInstance() { if (instance == null) { instance = new DATEXIIUpdateService(); datexiiProcessServiceFactory = DATEXIIProcessServiceFactory.GetInstance(instance); DATEXIIModelUpdateNotificationProcessService datexiiModelUpdateNotificationProcessService = (DATEXIIModelUpdateNotificationProcessService)datexiiProcessServiceFactory.getDATEXIIProcessService(DATEXIIProcessServiceFactory.DATA_SERVICE_TYPE.NTIS_MODEL_UPDATE_NOTIFICATION); datexiiModelUpdateNotificationProcessService.initialise(); } return(instance); }
private DATEXIIProcessServiceFactory(DATEXIIUpdateService datexIIUpdateService) { logWrapper = new LogWrapper("DATEXIIProcessServiceFactory"); logWrapper.Info("Creating DATEXIIProcessServiceFactory object"); datexIIVMSProcessService = new DATEXIIVMSProcessService(); datexIIANPRProcessService = new DATEXIIANPRProcessService(); datexIIMIDASProcessService = new DATEXIIMIDASProcessService(); datexIITMUProcessService = new DATEXIITMUProcessService(); datexIIFusedSensorOnlyProcessService = new DATEXIIFusedSensorOnlyProcessService(); datexIIFusedFVDAndSensorProcessService = new DATEXIIFusedFVDAndSensorProcessService(); datexIINetworkModelUpdateService = new DATEXIINetworkModelUpdateService(datexIIUpdateService); datexIIModelUpdateNotificationProcessService = new DATEXIIModelUpdateNotificationProcessService(this); datexIIEventProcessService = new DATEXIIEventProcessService(); datexIINTISModelVMSProcessService = new DATEXIINTISModelVMSProcessService(); datexIINTISModelMeasurementSitesProcessService = new DATEXIINTISModelMeasurementSitesProcessService(); datexIINTISModelPredefinedLocationProcessService = new DATEXIINTISModelPredefinedLocationProcessService(); }
private void processNetworkModelXMLFiles(string filename) { FileStream nwkModelFileStream = null; try { nwkModelFileStream = File.OpenRead(filename); int fileLength = (int)nwkModelFileStream.Length; byte[] buffer = new byte[fileLength]; int count = 0; int sum = 0; while (sum < fileLength) { if (fileLength - sum > MAX_STRING_LENGTH) { count = MAX_STRING_LENGTH; } else { count = fileLength - sum; } nwkModelFileStream.Read(buffer, sum, count); sum += count; } logWrapper.Info("Added file to process queue: " + filename); datexIIUpdateService.addToMessageQueue(buffer); DATEXIIUpdateService.processDATEXIIUpdateXML(null, null); } catch (Exception e) { logWrapper.Error("Failed to read file: " + filename); logWrapper.Error(e.StackTrace); } finally { nwkModelFileStream.Close(); } }