} // OnBeginReadConfiguration /// <summary></summary> /// <param name="config"></param> protected override void OnEndReadConfiguration(IDEConfigLoading config) { base.OnEndReadConfiguration(config); // read the attributes var x = XConfigNode.Create(Server.Configuration, config.ConfigNew); destinationId = x.GetAttribute <string>("destination").ToUpper(); priority = x.GetAttribute <int>("priority"); fileNameFilter = x.GetAttribute <string[]>("inFilter"); // set directories directoryIn = x.GetAttribute <DirectoryInfo>("in"); directoryOut = x.GetAttribute <DirectoryInfo>("out"); } // proc OnEndReadConfiguration
} // OnBeginReadConfiguration /// <summary></summary> /// <param name="config"></param> protected override void OnEndReadConfiguration(IDEConfigLoading config) { base.OnEndReadConfiguration(config); // read the attributes var x = XConfigNode.Create(Server.Configuration, config.ConfigNew); this.destinationId = x.GetAttribute <string>("destination").ToUpper(); this.priority = x.GetAttribute <int>("priority"); this.fileNameFilter = x.GetAttribute <string>("inFilter").Split(new char[] { ' ', ';' }, StringSplitOptions.RemoveEmptyEntries); // set directories this.directoryIn = x.GetAttribute <DirectoryInfo>("in"); this.directoryOut = x.GetAttribute <DirectoryInfo>("out"); } // proc OnEndReadConfiguration
} // func GetFullName /// <summary></summary> /// <param name="config"></param> protected override void OnBeginReadConfiguration(IDEConfigLoading config) { base.OnBeginReadConfiguration(config); if (config.ConfigOld == null) // LogDatei darf nur einmal initialisiert werden { if (String.IsNullOrEmpty(Server.LogPath)) { throw new ArgumentNullException("logPath", "LogPath muss gesetzt sein."); } // Lege die Logdatei an logFile = new DELogFile(LogFileName); logFile.LinesAdded += (sender, e) => OnLinesAdded(); ConfigLogItemCount++; } // Lese die Parameter für die Logdatei var log = XConfigNode.Create(Server.Configuration, config.ConfigNew).Element(DEConfigurationConstants.xnLog); SetLogSize((uint)log.GetAttribute <FileSize>("min").Value, (uint)log.GetAttribute <FileSize>("max").Value); } // proc OnBeginReadConfiguration
} // class PpsReportSession #endregion private void BeginReadConfigurationReport(IDEConfigLoading config) { var currentNode = XConfigNode.Create(Server.Configuration, config.ConfigNew).Element(PpsStuff.xnReports); var systemPath = currentNode.GetAttribute <string>("system") ?? throw new DEConfigurationException(currentNode.Data, "@system is empty."); var basePath = currentNode.GetAttribute <string>("base") ?? throw new DEConfigurationException(currentNode.Data, "@base is empty."); var logPath = currentNode.GetAttribute <string>("logs"); var workPath = currentNode.GetAttribute <string>("work"); // check for recreate the reporting engine if (reporting == null || !ProcsDE.IsPathEqual(reporting.EnginePath, systemPath) || !ProcsDE.IsPathEqual(reporting.BasePath, basePath) || (logPath != null && !ProcsDE.IsPathEqual(reporting.LogPath, logPath)) || (workPath != null && !ProcsDE.IsPathEqual(reporting.WorkingPath, workPath))) { reporting = new PpsReportEngine(systemPath, basePath, reportProvider, CreateReportSession, reportWorkingPath: workPath, reportLogPath: logPath); } // update values reporting.CleanBaseDirectoryAfter = currentNode.GetAttribute <int>("cleanBaseDirectory"); reporting.ZipLogFiles = currentNode.GetAttribute <bool>("zipLogFiles"); reporting.StoreSuccessLogs = currentNode.GetAttribute <bool>("storeSuccessLogs"); } // proc BeginReadConfigurationReport