public static void InitComponents(MainWindow mainWindow) { Window = mainWindow; InitCellTemplates(); ApplyCellTemplates(); FillSpendFiltersTable(); FillIncomeFiltersTable(); FillSpendItemsTable(); FillIncomeItemsTable(); Report = new AnalysisReport(Window); Report.Init(); Window.datePicker.Value = DateTime.Now.Date; CalculateMoneyLeft(null, null); Window.tabControl.Selecting += (o, e) => { switch (e.TabPageIndex) { case 0: UpdateSpendItemsTable(Window.spendGrid, Window.datePicker.Value.Date); break; case 1: UpdateIncomeItemsTable(Window.incomeGrid, Window.datePicker.Value.Date); break; case 2: TreeViewControl.FillSpendFilters(Window.AnalysisFiltersTree); break; } }; }
public override void Process(AnalysisLayer layer, ref Analysis.Reporting.Analysis analysis) { // Create the report and the analysis layer to report on. var report = new AnalysisReport(); report.Name = "Simplification Report"; // Perform various analysis operations. ProcessFrequentExpressions(layer, report); // Add our layers and report to the analysis result. if (report.Issues.Count > 0) { layer.Reports.Add(report); } }
public void CmdletWithUnapprovedVerb() { cmdletSignatureVerifier.Analyze( new List <string> { _testCmdletDirPath }, ((dirList) => { return(new List <string> { _testCmdletDirPath }); }), (cmdletName) => cmdletName.Equals("Prepare-SampleCmdlet", StringComparison.OrdinalIgnoreCase)); AnalysisReport testReport = cmdletSignatureVerifier.GetAnalysisReport(); Assert.Equal(1, testReport.ProblemIdList.Count); Assert.True(testReport.ProblemIdList.Where <int>((problemId) => problemId.Equals(SignatureProblemId.CmdletWithUnapprovedVerb)).SingleOrDefault <int>().Equals(SignatureProblemId.CmdletWithUnapprovedVerb)); }
public void AddVerbWithSupportsShouldProcessParameter() { cmdletSignatureVerifier.Analyze( new List <string> { _testCmdletDirPath }, ((dirList) => { return(new List <string> { _testCmdletDirPath }); }), (cmdletName) => cmdletName.Equals("Add-AddVerbWithSupportsShouldProcessParameter", StringComparison.OrdinalIgnoreCase)); AnalysisReport testReport = cmdletSignatureVerifier.GetAnalysisReport(); Assert.Equal(0, testReport.ProblemIdList.Count); //Assert.True(testReport.ProblemIdList.Where<int>((problemId) => problemId.Equals(SignatureProblemId.ActionIndicatesShouldProcess)).SingleOrDefault<int>().Equals(SignatureProblemId.ActionIndicatesShouldProcess)); }
public void ParameterWithPluralNoun() { cmdletSignatureVerifier.Analyze( new List <string> { _testCmdletDirPath }, ((dirList) => { return(new List <string> { _testCmdletDirPath }); }), (cmdletName) => cmdletName.Equals("Get-SampleBar", StringComparison.OrdinalIgnoreCase)); AnalysisReport testReport = cmdletSignatureVerifier.GetAnalysisReport(); Assert.Equal(1, testReport.ProblemIdList.Count); Assert.True(testReport.ProblemIdList.Where <int>((problemId) => problemId.Equals(SignatureProblemId.ParameterWithPluralNoun)).SingleOrDefault <int>().Equals(SignatureProblemId.ParameterWithPluralNoun)); }
public AnalysisReport GetAnalysisReport() { var analysisReport = new AnalysisReport(); var reportLog = Logger.GetReportLogger(BreakingChangeIssueReportLoggerName); if (!reportLog.Records.Any()) { return(analysisReport); } foreach (var rec in reportLog.Records) { analysisReport.ProblemIdList.Add(rec.ProblemId); } return(analysisReport); }
public void ConfirmImpactWithoutSupportsShouldProcess() { cmdletSignatureVerifier.Analyze( new List <string> { _testCmdletDirPath }, ((dirList) => { return(new List <string> { _testCmdletDirPath }); }), (cmdletName) => cmdletName.Equals("Test-ConfirmImpactWithoutSupportsShouldProcess", StringComparison.OrdinalIgnoreCase)); AnalysisReport testReport = cmdletSignatureVerifier.GetAnalysisReport(); Assert.Equal(2, testReport.ProblemIdList.Count); Assert.True(testReport.ProblemIdList.Where <int>((problemId) => problemId.Equals(SignatureProblemId.ConfirmLeveleWithNoShouldProcess)).SingleOrDefault <int>().Equals(SignatureProblemId.ConfirmLeveleWithNoShouldProcess)); Assert.True(testReport.ProblemIdList.Where <int>((problemId) => problemId.Equals(SignatureProblemId.ConfirmLevelChange)).SingleOrDefault <int>().Equals(SignatureProblemId.ConfirmLevelChange)); }
public void ShouldContinueVerbWithoutForceSwitch() { cmdletSignatureVerifier.Analyze( new List <string> { _testCmdletDirPath }, ((dirList) => { return(new List <string> { _testCmdletDirPath }); }), (cmdletName) => cmdletName.Equals("Export-ShouldContinueVerbWithoutForceSwitch", StringComparison.OrdinalIgnoreCase)); AnalysisReport testReport = cmdletSignatureVerifier.GetAnalysisReport(); Assert.Equal(2, testReport.ProblemIdList.Count); Assert.True(testReport.ProblemIdList.Where <int>((problemId) => problemId.Equals(SignatureProblemId.CmdletWithDestructiveVerbNoForce)).SingleOrDefault <int>().Equals(SignatureProblemId.CmdletWithDestructiveVerbNoForce)); Assert.True(testReport.ProblemIdList.Where <int>((problemId) => problemId.Equals(SignatureProblemId.ActionIndicatesShouldProcess)).SingleOrDefault <int>().Equals(SignatureProblemId.ActionIndicatesShouldProcess)); }
public void RemoveValueFromPipelineByPropertyName() { cmdletBreakingChangeAnalyzer.Analyze( new List <string> { _testCmdletDirPath }, ((dirList) => { return(new List <string> { _testCmdletDirPath }); }), (cmdletName) => cmdletName.Equals("Test-RemoveValueFromPipelineByPropertyName", StringComparison.OrdinalIgnoreCase)); AnalysisReport testReport = cmdletBreakingChangeAnalyzer.GetAnalysisReport(); Assert.Equal(1, testReport.ProblemIdList.Count); Assert.True(testReport.ProblemIdList .Where <int>((problemId) => problemId.Equals(BreakingChangeProblemId.ValueFromPipelineByPropertyName)) .SingleOrDefault <int>().Equals(BreakingChangeProblemId.ValueFromPipelineByPropertyName)); }
public void DifferentGenericTypeArgumentSize() { cmdletBreakingChangeAnalyzer.Analyze( new List <string> { _testCmdletDirPath }, ((dirList) => { return(new List <string> { _testCmdletDirPath }); }), (cmdletName) => cmdletName.Equals("Test-DifferentGenericTypeArgumentSize", StringComparison.OrdinalIgnoreCase)); AnalysisReport testReport = cmdletBreakingChangeAnalyzer.GetAnalysisReport(); Assert.Equal(1, testReport.ProblemIdList.Count); Assert.True(testReport.ProblemIdList .Where <int>((problemId) => problemId.Equals(BreakingChangeProblemId.DifferentGenericTypeArgumentSize)) .SingleOrDefault <int>().Equals(BreakingChangeProblemId.DifferentGenericTypeArgumentSize)); }
/// <summary> /// Creates analysis report /// </summary> /// <returns></returns> public AnalysisReport GetAnalysisReport() { //TODO: in next sprint, more work is scheduled to add more enhancements to this tool. // this report is necessary when tests needs more informaiton on results of static analysis // more information will be added to this report var analysisReport = new AnalysisReport(); var reportLog = Logger.GetReportLogger(_signatureIssueReportLoggerName); if (reportLog.Records.Any()) { foreach (var rec in reportLog.Records) { analysisReport.ProblemIdList.Add(rec.ProblemId); } } return(analysisReport); }
public void ChangeValidateRangeMaximum() { cmdletBreakingChangeAnalyzer.Analyze( new List <string> { _testCmdletDirPath }, ((dirList) => { return(new List <string> { _testCmdletDirPath }); }), (cmdletName) => cmdletName.Equals("Test-ChangedValidateRangeMaximum", StringComparison.OrdinalIgnoreCase)); AnalysisReport testReport = cmdletBreakingChangeAnalyzer.GetAnalysisReport(); Assert.Equal(1, testReport.ProblemIdList.Count); Assert.True(testReport.ProblemIdList .Where <int>((problemId) => problemId.Equals(BreakingChangeProblemId.ChangedValidateRangeMaximum)) .SingleOrDefault <int>().Equals(BreakingChangeProblemId.ChangedValidateRangeMaximum)); }
public void ChangeValidateSet() { cmdletBreakingChangeAnalyzer.Analyze( new List <string> { _testCmdletDirPath }, ((dirList) => { return(new List <string> { _testCmdletDirPath }); }), (cmdletName) => cmdletName.Equals("Test-ChangeValidateSet", StringComparison.OrdinalIgnoreCase)); AnalysisReport testReport = cmdletBreakingChangeAnalyzer.GetAnalysisReport(); Assert.Equal(2, testReport.ProblemIdList.Count); foreach (var problemId in testReport.ProblemIdList) { Assert.Equal(BreakingChangeProblemId.RemovedValidateSetValue, problemId); } }
public void ForceParameterWithoutSupportsShouldProcess() { cmdletSignatureVerifier.Analyze( new List <string> { _testCmdletDirPath }, ((dirList) => { return(new List <string> { _testCmdletDirPath }); }), (cmdletName) => cmdletName.Equals("Test-ForceParameterWithoutSupportsShouldProcess", StringComparison.OrdinalIgnoreCase)); analysisLogger.Info("Foo"); AnalysisReport testReport = cmdletSignatureVerifier.GetAnalysisReport(); Assert.Equal(1, testReport.ProblemIdList.Count); Assert.True(testReport.ProblemIdList.Where <int>((problemId) => problemId.Equals(SignatureProblemId.ForceWithoutShouldProcessAttribute)).SingleOrDefault <int>().Equals(SignatureProblemId.ForceWithoutShouldProcessAttribute)); }
public async Task <HttpResponseMessage> PostAnalysisReport(AnalysisReport analysisReport, string productName, string version) { try { analysisReport.Version = version; await _analysisReportManager.InsertOrUpdateAnalysisReportAsync(productName, version, analysisReport); // Run the analysis await _analyzer.AnalyzeAndPersistResultsAsync(productName, version); return(Request.CreateResponse(HttpStatusCode.Created)); } catch (Exception ex) { System.Diagnostics.Trace.WriteLine(ex); return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex)); } }
public void ChangeParameterOrder() { cmdletBreakingChangeAnalyzer.Analyze( new List <string> { _testCmdletDirPath }, ((dirList) => { return(new List <string> { _testCmdletDirPath }); }), (cmdletName) => cmdletName.Equals("Test-ChangeParameterOrder", StringComparison.OrdinalIgnoreCase)); AnalysisReport testReport = cmdletBreakingChangeAnalyzer.GetAnalysisReport(); Assert.Equal(3, testReport.ProblemIdList.Count); foreach (var problemId in testReport.ProblemIdList) { Assert.Equal(BreakingChangeProblemId.PositionChange, problemId); } }
public AnalysisReport GetAggregation( DateTimeOffset @from, DateTimeOffset to, TimeAggregation timeAggregation, SelectedSeries[] selectedSeries) { var dbCaseEntry = _dbHandler.GetQueryable <CaseReport>() .Where(x => x.Timestamp >= from && x.Timestamp < to) .ToList(); var groups = dbCaseEntry.OrderBy(x => x.Timestamp.Date).GroupBy(x => TimeWindowGrouping(x.Timestamp.Date, timeAggregation)); var report = new AnalysisReport { From = @from, To = to, TimeAggregation = timeAggregation, Categories = groups.Select(x => x.Key).ToArray(), Series = GetSeries(groups, selectedSeries), }; return(report); }
private List <AnalysisReport> ParseReportToList(string[] lines) { List <AnalysisReport> report = new List <AnalysisReport>(); foreach (string line in lines) { if (line.Contains("error")) { AnalysisReport analysisReport = new AnalysisReport(); int startIndex; startIndex = (line.IndexOf("): ") + ("): ").Length); analysisReport.TypeId = line.Substring(startIndex, 11); startIndex = 0; analysisReport.FileName = line.Substring(startIndex, line.IndexOf(" (") - startIndex); //analysisReport.Line startIndex = line.IndexOf(" (") + (" (").Length; var lineNo = line.Substring(startIndex, line.IndexOf("): ") - startIndex); try { analysisReport.Line = Convert.ToInt32(lineNo); } catch { analysisReport.Line = 0; } startIndex = line.IndexOf("): ") + ("): ").Length + 12; analysisReport.Message = line.Substring(startIndex, line.Length - startIndex); report.Add(analysisReport); } } return(report); }
private List <AnalysisReport> ParseReportToList(string[] lines) { List <AnalysisReport> report = new List <AnalysisReport>(); foreach (string line in lines) { if (line.Contains("<Issue TypeId=")) { AnalysisReport analysisReport = new AnalysisReport(); int startIndex; startIndex = (line.IndexOf("TypeId=") + ("TypeId=").Length + 1); analysisReport.TypeId = line.Substring(startIndex, line.IndexOf("File=") - startIndex - 2); startIndex = line.IndexOf("File=") + ("File=").Length + 1; analysisReport.FileName = line.Substring(startIndex, line.IndexOf("Offset=") - startIndex - 2); //analysisReport.Line startIndex = line.IndexOf("Line=") + ("Line=").Length + 1; var lineNo = line.Substring(startIndex, line.IndexOf("Message=") - startIndex - 2); try { analysisReport.Line = Convert.ToInt32(lineNo); } catch { analysisReport.Line = 0; } startIndex = line.IndexOf("Message=") + ("Message=").Length + 1; analysisReport.Message = line.Substring(startIndex, line.IndexOf("/>") - startIndex - 2); report.Add(analysisReport); } } return(report); }
public void AddAliasForChangedCmdlet() { cmdletBreakingChangeAnalyzer.Analyze( new List <string> { _testCmdletDirPath }, ((dirList) => { return(new List <string> { _testCmdletDirPath }); }), (cmdletName) => cmdletName.Equals("Test-AddAliasForChangedCmdlet", StringComparison.OrdinalIgnoreCase)); AnalysisReport testReport = cmdletBreakingChangeAnalyzer.GetAnalysisReport(); string output = "Test-AddAliasForChangedCmdlet\nProblemId Count: " + testReport.ProblemIdList.Count; foreach (var problemId in testReport.ProblemIdList) { output += "\nProblemId: " + problemId; } xunitOutput.WriteLine(output); Assert.Equal(0, testReport.ProblemIdList.Count); }
private AnalysisReport ParseReportToList(string[] lines) { int noOfDupilcates = -1; StringBuilder message = new StringBuilder(); foreach (string line in lines) { if (line.Contains("Found")) { int startIndex; startIndex = (line.IndexOf("Found ") + ("Found ").Length); var lineNo = line.Substring(startIndex, line.IndexOf("duplicate") - startIndex); noOfDupilcates = Convert.ToInt32(lineNo); } message.Append(line + "\n"); } AnalysisReport analysisReport = new AnalysisReport { Line = noOfDupilcates, Message = message.ToString() }; return(analysisReport); }
private void ProcessFrequentExpressions(AnalysisLayer layer, AnalysisReport report) { // Perform analysis. var expressionTreeVisitor = new CalculateExpressionTreeVisitor(); layer.AstBuilder.CompilationUnit.AcceptVisitor(expressionTreeVisitor); // If there are no counts of this being an issue, don't create // an issue entry. if (expressionTreeVisitor.UniqueNodes.Count(x => x.Value.Count >= this.WarningLimit) == 0) { return; } var minCounts = expressionTreeVisitor.UniqueNodes.Where(x => x.Value.Count >= this.WarningLimit).Min(x => x.Value.Count); var maxCounts = expressionTreeVisitor.UniqueNodes.Where(x => x.Value.Count >= this.WarningLimit).Max(x => x.Value.Count); if (maxCounts == 0) { return; } // Write out issue analysis. var issue = new AnalysisIssue(); issue.ID = "W0001"; issue.Name = "Frequent expressions identified"; issue.Description = "The following frequent (occurring greater than " + this.WarningLimit + " times) expressions have been identified in the algorithm implementation."; foreach (var kv in expressionTreeVisitor.UniqueNodes) { foreach (var node in kv.Value.AstNodes) { var startTrackingInfo = node.Annotations.Where(x => x is StartTrackingInfo).Cast <StartTrackingInfo>().FirstOrDefault(); var endTrackingInfo = node.Annotations.Where(x => x is EndTrackingInfo).Cast <EndTrackingInfo>().FirstOrDefault(); if (startTrackingInfo == null || endTrackingInfo == null) { continue; } if (kv.Value.Count < this.WarningLimit) { continue; } var location = new AnalysisLocationHighlight(); location.Start = startTrackingInfo.CharacterPosition; location.End = endTrackingInfo.CharacterPosition; if (this.GradientMode == WarningGradientMode.Relative) { if (maxCounts - Math.Max(this.WarningLimit, minCounts) == 0) { location.Importance = 100; } else { location.Importance = (int)Math.Round( (kv.Value.Count - Math.Max(this.WarningLimit, minCounts)) / (double)(maxCounts - Math.Max(this.WarningLimit, minCounts)) * 100); } } else { var count = Math.Min(Math.Max(kv.Value.Count, this.WarningLimit), this.ErrorLimit); location.Importance = (int)(((count - this.WarningLimit) / (double)(this.ErrorLimit - this.WarningLimit)) * 100); } location.Message = "Occurs " + kv.Value.Count + " times"; issue.Locations.Add(location); } } issue.FlattenLocations(); if (issue.Locations.Count == 0) { return; } report.Issues.Add(issue); }
public void OnCompleted(AnalysisReport report) { }
/// <summary> /// Inserts or updates the provided <paramref name="report"/> for the provided <paramref name="productName">product</paramref> and <paramref name="version"/>. /// </summary> /// <param name="productName">Name of the product that the analysis report relates to.</param> /// <param name="version">Version of the product that the analysis report relates to.</param> /// <param name="report">An <see cref="AnalysisReport"/> to insert or update.</param> public async Task InsertOrUpdateAnalysisReportAsync(string productName, string version, AnalysisReport report) { var configuration = await _configurationManager.GetOrCreateConfigurationAsync(); using (var session = _storeProvider.Store.OpenAsyncSession()) { // Store will override the existing report if it already exists await session.StoreAsync(report, $"{productName}/{version}/{report.AnalyzedProject}"); session.SetExpirationAccordingToConfiguration(report, version, configuration); session.Advanced.GetMetadataFor(report)["Product"] = productName; await session.SaveChangesAsync(); } }
public void OnCompleted(AnalysisReport report) { SLog.log.InfoFormat("Finished "); }
/// <summary> /// Creates analysis report /// </summary> /// <returns></returns> public AnalysisReport GetAnalysisReport() { //TODO: in next sprint, more work is scheduled to add more enhancements to this tool. // this report is necessary when tests needs more informaiton on results of static analysis // more information will be added to this report AnalysisReport analysisReport = new AnalysisReport(); ReportLogger reportLog = Logger.GetReportLogger(signatureIssueReportLoggerName); if(reportLog.Records.Any()) { foreach(IReportRecord rec in reportLog.Records) { analysisReport.ProblemIdList.Add(rec.ProblemId); } } return analysisReport; }
/// <summary> /// Inserts or updates the provided <paramref name="report"/> for the provided <paramref name="productName">product</paramref> and <paramref name="version"/>. /// </summary> /// <param name="productName">Name of the product that the analysis report relates to.</param> /// <param name="version">Version of the product that the analysis report relates to.</param> /// <param name="report">An <see cref="AnalysisReport"/> to insert or update.</param> public async Task InsertOrUpdateAnalysisReportAsync(string productName, string version, AnalysisReport report) { var configuration = await ConfigurationManager.GetOrCreateConfigurationAsync(); using (var session = Database.DocumentStore.OpenAsyncSession()) { // Store will override the existing report if it already exists await session.StoreAsync(report, $"{productName}/{version}/{report.AnalyzedProject}"); session.SetExpirationIfEnabled(report, version, configuration); session.Advanced.GetMetadataFor(report)["Product"] = new RavenJValue(productName); await session.SaveChangesAsync(); } }
/// <summary> /// 主函数 /// </summary> /// <param name="args">需要传入的数据</param> public static void Main(string[] args) { try { // bin文件的地址 var pathbin = args.Length == 0 ? "" : args[0]; //var pathbin = @"C:\resource\金网运营管理系统\GTSharp\Bin\67e33f08-3b94-4afb-83e5-063c559dfa76.bin"; //var pathbin = @"D:\VS\LYSDLYYWX\LYSDLYYWX\bin\Debug\GTSharp\Bin\1a28113e-67d4-4e6a-9824-96b02bb23705.bin"; //fa6792dc-faa0-4295-b06f-d7bab6392316.bin // 转化为对象 //GTDataFile datafile = GTSharp.Core.SerializeHelper.FileTObje<GTDataFile>(pathbin); //// 执行数据 //GTHelper.Save(datafile); //GTSharp.Core.Log.Log4Net.Info("成功!"); ////关闭 //Close(); //return; //pathbin = @"D:\VS\LYSDLYYWX\LYSDLYYWX\bin\Debug\GTSharp\Bin\224c71d9-61be-4c7a-ac43-2106af293fcb.bin"; //pathbin = @"C:\Users\Administrator\Desktop\0f8783e4-6966-4f4e-8bb5-03092ea5c308.bin"; // 转化为对象 ClassCOM com = GTSharp.Core.SerializeHelper.FileTObje <ClassCOM>(pathbin); //switch (datafile.Command) switch (com.ComName) { case "每日1科室在院人数一览表": AnalysisReport.MRYYCXBB1(com); //AnalysisReport.MR1(GTHelper.Save(datafile)); break; case "每日2按手术时间统计手术人数表": AnalysisReport.MRYYCXBB2(com); break; case "每日3在院危重病人患者明细表": AnalysisReport.MRYYCXBB3(com); break; case "每日4在院I级护理患者明细表": AnalysisReport.MRYYCXBB3(com); break; case "每日6在院护理无患者明细表": AnalysisReport.MRYYCXBB3(com); break; case "每日5主要业务数据表": AnalysisReport.MRYYCXBB5(com); break; case "每日7主要业务数据表": AnalysisReport.MRYYCXBB7(com); break; case "每日8主要业务数据表": AnalysisReport.MRYYCXBB8(com); break; case "每日9科室在院人数一览表": AnalysisReport.MRYYCXBB9(com); break; case "每日10门诊退费明细": AnalysisReport.MRYYCXBB10(com); break; case "每日11门诊日志登记表": AnalysisReport.MRYYCXBB11(com); break; case "每日12门诊日志汇总表": AnalysisReport.MRYYCXBB12(com); break; case "每日13门诊疑似胸痛患者列表": AnalysisReport.MRYYCXBB13(com); break; case "全院未交病历": QYWTJBL.WeekReport1(com); break; case "DR报告打印": FSK.DRBGDY(com); break; case "每周院长查询报表": AnalysisReport.MZYZCXBB1(com); break; case "每周2主要业务数据表": AnalysisReport.MZYZCXBB2(com); break; case "删除多余数据": DeleteBin(Path.GetDirectoryName(pathbin), 50); break; case "河南省医疗服务恢复情况监测周报表": Class1.hnsylfwhfqkjczbb(com); break; case "入院人数和门急诊就诊人数": Class1.ryrshmjzjzrs(com); break; case "心血管疾病病人信息": Class1.xxgjbbrxx(com); break; case "每月洛轴医保卡帐户": AnalysisReport.MYLZYBKZH(com); break; case "每月1住院主要业务数据同期比表": AnalysisReport.MYYZCXBB1(com); break; case "每月2医技科室收入数据同期比表": AnalysisReport.MYYZCXBB2(com); break; case "每月4每月手术人数表": AnalysisReport.MYYZCXBB4(com); break; case "每月3门急诊数据同期比表": AnalysisReport.MYYZCXBB3(com); break; case "每月5主要业务数据表": AnalysisReport.MYYZCXBB5(com); break; case "每月6主要业务数据表": AnalysisReport.MYYZCXBB6(com); break; case "每月在院人数": Class1.myzyrs(com); break; case "每日核酸检测信息": Class1.MRHSJCXX(com); break; case "每日核酸检测信息1": Class1.MRHSJCXX1(com); break; case "每日核酸检测信息2": Class1.MRHSJCXX2(com); break; case "每日核酸检测信息3": Class1.MRHSJCXX3(com); break; // default: // 删除多余数据 DeleteBin(Path.GetDirectoryName(pathbin), 50); GTSharp.Core.Log.Log4Net.Info("未知命令?"); Console.ReadLine(); break; } GTSharp.Core.Log.Log4Net.Info("成功!"); //关闭 Close(); } catch (Exception ex) { GTSharp.Core.Log.Log4Net.Error(ex); Console.ReadLine(); } }