/* public ActionResult ManpowerStatusSummary(string accountmanager, DateTime? datefrom, DateTime? dateto) * { * var list = db.sp_manpower_status_summary(accountmanager, datefrom, dateto); * return View(list); * } * * public ActionResult ManpowerStatusSummaryNewPerTotalRequirement(string accountmanager, DateTime? datefrom, DateTime? dateto) * { * var list = db.sp_manpower_status_summary_new_per_total_requirement(accountmanager, datefrom, dateto); * return View(list); * } * public ActionResult ManpowerStatusSummaryClosedPerTotalRequirement(string accountmanager, DateTime? datefrom, DateTime? dateto) * { * var list = db.sp_manpower_status_summary_closed_per_total_requirement(accountmanager, datefrom, dateto); * return View(list); * } * public ActionResult ManpowerStatusSummaryNewReplacementCancelledPerTotalRequirement(string accountmanager, DateTime? datefrom, DateTime? dateto) * { * var list = db.sp_manpower_status_summary_newreplacementcancelled_per_total_requirement(accountmanager, datefrom, dateto); * return View(list); * } * public ActionResult ManpowerStatusSummaryOncallPerTotalRequirement(string accountmanager, DateTime? datefrom, DateTime? dateto) * { * var list = db.sp_manpower_status_summary_Oncall_per_total_requirement(accountmanager, datefrom, dateto); * return View(list); * }*/ public ActionResult ManpowerStatusSummaryExport(string accountmanager, DateTime?datefrom, DateTime?dateto) { ExportReport export = new ExportReport(); var res = export.ExportManpowerSummaryReport(accountmanager, datefrom, dateto); return(File(res.ToArray(), "application/vnd.ms-excel", "Manpower Status Summary Report.xlsx")); }
public ActionResult ExportManpowerStatusReport(ManpowerStatusReportViewModel i) { ExportReport export = new ExportReport(); var sr = export.ExportManpowerReport(i); return(File(sr.ToArray(), "application/vnd.ms-excel", "Manpower Status Report " + Convert.ToDateTime(i.DateFrom).ToString("MM-dd-yy") + "-" + Convert.ToDateTime(i.DateTo).ToString("MM-dd-yy") + ".xls")); }
private ContractExecutionResult ProcessWithRaptor(ExportReport request) { var raptorFilter = RaptorConverters.ConvertFilter(request.Filter, request.ProjectId, raptorClient); bool success = raptorClient.GetProductionDataExport(request.ProjectId ?? VelociraptorConstants.NO_PROJECT_ID, ASNodeRPC.__Global.Construct_TASNodeRequestDescriptor(request.CallId ?? Guid.NewGuid(), 0, TASNodeCancellationDescriptorType.cdtProdDataExport), RaptorConverters.convertToRaptorUserPreferences(request.UserPrefs), (int)request.ExportType, request.CallerId, raptorFilter, RaptorConverters.ConvertLift(request.LiftBuildSettings, raptorFilter.LayerMethod), request.TimeStampRequired, request.CellSizeRequired, request.RawData, request.RestrictSize, true, request.Tolerance, request.IncludeSurveydSurface, request.Precheckonly, request.Filename, RaptorConverters.convertToRaptorMachines(request.MachineList), (int)request.CoordType, (int)request.OutputType, request.DateFromUTC, request.DateToUTC, RaptorConverters.convertToRaptorTranslations(request.Translations), RaptorConverters.convertToRaptorProjectExtents(request.ProjectExtents), out var dataexport); if (success) { try { return(ExportResult.Create( File.ReadAllBytes(BuildFilePath(request.ProjectId ?? VelociraptorConstants.NO_PROJECT_ID, request.CallerId, request.Filename, true)), dataexport.ReturnCode)); } catch (Exception ex) { throw new ServiceException(HttpStatusCode.NoContent, new ContractExecutionResult(ContractExecutionStatesEnum.ValidationError, "Failed to retrieve received export data: " + ex.Message)); } } throw CreateServiceException <ExportReportExecutor>(dataexport.ReturnCode); }
public HttpResponseMessage exportReportCsv(Guid orgId, Guid projId, Guid? locId) { DateTime? startDate = grabStartDate(); DateTime? endDate = grabEndDate(); var response = csvStream("export.csv", new PushStreamContent((stream, content, context) => { var writer = new StreamWriter(stream); ExportReport.buildCSV(writer, orgId, projId, locId, startDate, endDate); })); return response; // csvData(ExportReport.buildCSV(orgId, projId, locId, startDate, endDate), "export.csv"); } // exportReportCsv
private void tsb_生成报告_Click(object sender, EventArgs e) { if (DefaultBase.IsSetTong) { ExportReport ep = new ExportReport(_tempCode); ep.Show(); ep.TopMost = true; } else { MessageBox.Show("请先检测设定", "检测", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void AddExportReport( ExportReport.ReportLevel level, String sourceComponent, String description, String detail, IEnumerable <IExportSource> sourceExportData, Exception exception = null) { var exportReport = new ExportReport { Level = level, SourceComponent = sourceComponent, Description = description, Detail = detail, Exception = exception, ExportSources = sourceExportData }; switch (this.ExportContext) { case ExportContext.Data: if (this._currentObjectBase.Any()) { this._currentObjectBase.Last().Reports.Add(exportReport); this._currentObjectBase.Last().ExportValidity = ExportValidity.Malformed; } else { this.Reports.Add(exportReport); this.ExportValidity = ExportValidity.Malformed; } break; case ExportContext.Parsing: this.Reports.Add(exportReport); this.ExportValidity = ExportValidity.Malformed; break; case ExportContext.Done: this.Reports.Add(exportReport); this.ExportValidity = ExportValidity.Malformed; break; case ExportContext.Unknown: this.Reports.Add(exportReport); this.ExportValidity = ExportValidity.Malformed; break; } }
public async Task <ExportResult> PostExportReport([FromBody] ExportReport request) { _log.LogDebug($"{nameof(PostExportReport)}: {JsonConvert.SerializeObject(request)}"); request.Validate(); return(await RequestExecutorContainerFactory.Build <ExportReportExecutor>( _logger, #if RAPTOR raptorClient, null, #endif configStore : configStore, trexCompactionDataProxy : tRexCompactionDataProxy, userId : GetUserId(), fileImportProxy : FileImportProxy) .ProcessAsync(request) as ExportResult); }
public static List <ExportReport> exportToSVG(List <SVG> vectors, string destination) { if (vectors == null || destination == null || !Directory.Exists(destination)) { return(null); } if (destination.ToCharArray(destination.Length - 1, 1)[0] != '\\') { destination += "\\"; } masterGarbageDispose(vectors); List <ExportReport> reports = new List <ExportReport>(); foreach (SVG vector in vectors) { string fileName = Path.GetFileNameWithoutExtension(vector.path); ExportReport report = new ExportReport(); try { File.WriteAllText(destination + fileName + ".svg", vector.data); report.error = false; report.message = "Successfully exported '" + fileName + "' to '" + destination + fileName + ".svg'."; } catch (Exception e) { report.error = true; report.message = "An error occurred exporting '" + fileName + "' with the following message: " + e.Message; } reports.Add(report); } return(reports); }
public void ExportReport(string savePath) { string fileName = savePath + "\\" + DataModel.Ath_Name + DataModel.DJoint + DataModel.DPlane.Replace('/', 'v') + DataModel.Speed1 + "(" + DataModel.BaseFileName + ")" + ".pdf"; tab.SelectedIndex = 1; tab.UpdateLayout(); tab.SelectedIndex = 2; tab.UpdateLayout(); tab.SelectedIndex = 3; tab.UpdateLayout(); tab.SelectedIndex = 0; tab.UpdateLayout(); try { XDocument reportDoc = XDocument.Load(AppDomain.CurrentDomain.BaseDirectory + "\\AppTemplate\\report.xml"); XElement titleEle = reportDoc.Descendants("title").ElementAt <XElement>(0); titleEle.Value = DataModel.Ath_Name + "单项测试报告"; IEnumerable <XElement> tableEles = reportDoc.Descendants("table"); XElement athInfoTable = tableEles.ElementAt <XElement>(0); IEnumerable <XElement> athInfoCells = athInfoTable.Descendants("cell"); athInfoCells.ElementAt(0).Attribute("value").Value = DataModel.Ath_Name; athInfoCells.ElementAt(1).Attribute("value").Value = DataModel.Ath_Sex; athInfoCells.ElementAt(2).Attribute("value").Value = DataModel.Ath_Birthday.ToString("yyyy年MM月dd"); athInfoCells.ElementAt(3).Attribute("value").Value = DataModel.Ath_Height; athInfoCells.ElementAt(4).Attribute("value").Value = DataModel.Ath_Weight; athInfoCells.ElementAt(5).Attribute("value").Value = DataModel.Ath_Project; athInfoCells.ElementAt(6).Attribute("value").Value = DataModel.Ath_MainProject; athInfoCells.ElementAt(7).Attribute("value").Value = DataModel.Ath_TrainYears; athInfoCells.ElementAt(8).Attribute("value").Value = DataModel.Ath_Level; athInfoCells.ElementAt(8).Attribute("value").Value = DataModel.Ath_Team; XElement testInfoEle = tableEles.ElementAt <XElement>(1); IEnumerable <XElement> testInfoCells = testInfoEle.Descendants("cell"); testInfoCells.ElementAt(0).Attribute("value").Value = DataModel.Ath_TestAddress; testInfoCells.ElementAt(1).Attribute("value").Value = DataModel.Ath_TestState; testInfoCells.ElementAt(2).Attribute("value").Value = DataModel.Ath_TestDate.ToString("yyyy年MM月dd"); testInfoCells.ElementAt(3).Attribute("value").Value = DataModel.DJoint; testInfoCells.ElementAt(4).Attribute("value").Value = DataModel.DJointSide; testInfoCells.ElementAt(5).Attribute("value").Value = DataModel.DTestMode; testInfoCells.ElementAt(6).Attribute("value").Value = DataModel.DPlane; testInfoCells.ElementAt(7).Attribute("value").Value = DataModel.MotionRange; testInfoCells.ElementAt(8).Attribute("value").Value = DataModel.Speed; testInfoCells.ElementAt(9).Attribute("value").Value = DataModel.Break; testInfoCells.ElementAt(10).Attribute("value").Value = DataModel.NOOfSets; testInfoCells.ElementAt(11).Attribute("value").Value = DataModel.NOOfRepetitions; testInfoCells.ElementAt(12).Attribute("value").Value = DataModel.Ath_Remark; //统计信息节点 XElement statisticsInfoEle = tableEles.ElementAt <XElement>(2); IEnumerable <XElement> rowEles = statisticsInfoEle.Descendants("row"); //填充动作1和动作2的名称 XElement actionNameRowEle = rowEles.ElementAt(0); actionNameRowEle.Elements().ElementAt(1).Attribute("label").Value = actionModel.actionone; actionNameRowEle.Elements().ElementAt(2).Attribute("label").Value = actionModel.actiontwo; //填充测试次数 XElement choosedTestCountRowEle = rowEles.ElementAt(2); XElement action1Ele = dataDoc.Descendants("action1").ElementAt(0); XElement action2Ele = dataDoc.Descendants("action2").ElementAt(0); choosedTestCountRowEle.Elements().ElementAt(1).Attribute("label").Value = action1Ele.Attribute("index").Value; choosedTestCountRowEle.Elements().ElementAt(2).Attribute("label").Value = action2Ele.Attribute("index").Value; IEnumerable <XElement> oddValues = action1Ele.Elements(); IEnumerable <XElement> evenValue = action2Ele.Elements(); for (int i = 3; i < rowEles.Count(); i++) { IEnumerable <XElement> cellEles = rowEles.ElementAt(i).Elements(); XElement oddValueEle = oddValues.ElementAt(i - 3); XElement evenValueEle = evenValue.ElementAt(i - 3); if (cellEles.ElementAt(1).Attribute("colspan") != null) { string oddMaxValue = oddValueEle.Attribute("max").Value; cellEles.ElementAt(1).Attribute("label").Value = oddMaxValue; string evenMaxValue = evenValueEle.Attribute("max").Value; cellEles.ElementAt(2).Attribute("label").Value = evenMaxValue.Trim(); } else { string oddMaxValue = oddValueEle.Attribute("max").Value; cellEles.ElementAt(1).Attribute("label").Value = oddMaxValue; string oddAvgValue = oddValueEle.Attribute("avg").Value; cellEles.ElementAt(2).Attribute("label").Value = oddAvgValue.Trim(); string evenMaxValue = evenValueEle.Attribute("max").Value; cellEles.ElementAt(3).Attribute("label").Value = evenMaxValue.Trim(); string evenAvgValue = evenValueEle.Attribute("avg").Value; cellEles.ElementAt(4).Attribute("label").Value = evenAvgValue.Trim(); } } SaveToImage(chartGrid, AppDomain.CurrentDomain.BaseDirectory + "progress.jpg"); SaveToImage(maxMomentGrid, AppDomain.CurrentDomain.BaseDirectory + "maxcolumn.jpg"); SaveToImage(maxMomentLineGrid, AppDomain.CurrentDomain.BaseDirectory + "maxline.jpg"); SaveToImage(avgPanel, AppDomain.CurrentDomain.BaseDirectory + "avg.jpg"); exportReport = new ExportReport(reportDoc); exportReport.Export(fileName); File.Delete(AppDomain.CurrentDomain.BaseDirectory + "progress.jpg"); File.Delete(AppDomain.CurrentDomain.BaseDirectory + "maxcolumn.jpg"); File.Delete(AppDomain.CurrentDomain.BaseDirectory + "maxline.jpg"); File.Delete(AppDomain.CurrentDomain.BaseDirectory + "avg.jpg"); } catch (Exception ee) { MessageBox.Show(ee.Message, "系统错误"); } }
public static List <ExportReport> exportToPNG(List <SVG> vectors, string destination, Rectangle cropArea, bool doCrop) { if (vectors == null || destination == null || !Directory.Exists(destination)) { return(null); } if (destination.ToCharArray(destination.Length - 1, 1)[0] != '\\') { destination += "\\"; } masterGarbageDispose(vectors); List <ExportReport> reports = new List <ExportReport>(); foreach (SVG vector in vectors) { string fileName = Path.GetFileName(vector.path); ExportReport report = new ExportReport(); bool cropError = false; try { var pngDocument = getPreview(vector); if (doCrop) { cropError = (cropArea.X + cropArea.Width > pngDocument.Width || cropArea.Y + cropArea.Height > pngDocument.Height); if (!cropError) { pngDocument = pngDocument.Clone(cropArea, pngDocument.PixelFormat); } } if (!cropError) { pngDocument.Save(destination + Path.GetFileNameWithoutExtension(vector.path) + ".png", ImageFormat.Png); report.error = false; report.message = "Successfully exported '" + fileName + "' to '" + destination + Path.GetFileNameWithoutExtension(vector.path) + ".png'."; } else { report.error = true; report.message = "An error occurred exporting '" + fileName + "' with the following message: The desired cropping dimensions " + "exceeds the image boundaries!"; } } catch (Exception e) { report.error = true; report.message = "An error occurred exporting '" + fileName + "' with the following message: " + e.Message; } reports.Add(report); } return(reports); }
//public override void Prepare (BuildTarget target, // Model.NodeData node, // IEnumerable<PerformGraph.AssetGroups> incoming, // IEnumerable<Model.ConnectionData> connectionsToOutput, // PerformGraph.Output Output) //{ // ValidateExportPath( // m_exportPath[target], // GetExportPath(m_exportPath[target]), // () => { // throw new NodeException(node.Name + ":Export Path is empty.", node.Id); // }, // () => { // if( m_exportOption[target] == (int)ExportOption.ErrorIfNoExportDirectoryFound ) { // throw new NodeException(node.Name + ":Directory set to Export Path does not exist. Path:" + m_exportPath[target], node.Id); // } // } // ); //} //public override void Build (BuildTarget target, // Model.NodeData node, // IEnumerable<PerformGraph.AssetGroups> incoming, // IEnumerable<Model.ConnectionData> connectionsToOutput, // PerformGraph.Output Output, // Action<Model.NodeData, string, float> progressFunc) //{ // Export(target, node, incoming, connectionsToOutput, progressFunc); //} private void Export(BuildTarget target, Model.NodeData node, IEnumerable <PerformGraph.AssetGroups> incoming, IEnumerable <Model.ConnectionData> connectionsToOutput, Action <Model.NodeData, string, float> progressFunc) { if (incoming == null) { return; } var exportPath = GetExportPath(m_exportPath[target]); if (m_exportOption[target] == (int)ExportOption.DeleteAndRecreateExportDirectory) { if (Directory.Exists(exportPath)) { FileUtility.DeleteDirectory(exportPath, true); } } if (m_exportOption[target] != (int)ExportOption.ErrorIfNoExportDirectoryFound) { if (!Directory.Exists(exportPath)) { Directory.CreateDirectory(exportPath); } } var report = new ExportReport(node); var cacheFolderDepth = Model.Settings.Path.BundleBuilderCachePath.Split(Model.Settings.UNITY_FOLDER_SEPARATOR).Length; foreach (var ag in incoming) { foreach (var groupKey in ag.assetGroups.Keys) { var inputSources = ag.assetGroups[groupKey]; foreach (var source in inputSources) { var destinationSourcePath = source.importFrom; string destination = null; if (m_flattenDir[target] == 0) { // in bundleBulider, use platform-package folder for export destination. if (destinationSourcePath.StartsWith(Model.Settings.Path.BundleBuilderCachePath)) { var splitted = destinationSourcePath.Split(Model.Settings.UNITY_FOLDER_SEPARATOR); var reducedArray = new string[splitted.Length - cacheFolderDepth]; Array.Copy(splitted, cacheFolderDepth, reducedArray, 0, reducedArray.Length); var fromDepthToEnd = string.Join(Model.Settings.UNITY_FOLDER_SEPARATOR.ToString(), reducedArray); destinationSourcePath = fromDepthToEnd; } destination = FileUtility.PathCombine(exportPath, destinationSourcePath); } else { destination = FileUtility.PathCombine(exportPath, source.fileNameAndExtension); } var parentDir = Directory.GetParent(destination).ToString(); if (!Directory.Exists(parentDir)) { Directory.CreateDirectory(parentDir); } if (File.Exists(destination)) { File.Delete(destination); } if (string.IsNullOrEmpty(source.importFrom)) { report.AddErrorEntry(source.absolutePath, destination, "Source Asset import path is empty; given asset is not imported by Unity."); continue; } try { if (progressFunc != null) { progressFunc(node, string.Format("Copying {0}", source.fileNameAndExtension), 0.5f); } File.Copy(source.importFrom, destination); report.AddExportedEntry(source.importFrom, destination); } catch (Exception e) { report.AddErrorEntry(source.importFrom, destination, e.Message); } source.exportTo = destination; } } } AssetBundleBuildReport.AddExportReport(report); }
public ActionResult ExportApplicantSurveySummary(string month, string year) { ExportReport export = new ExportReport(); return(File(export.ExportApplicantSurveyReport(year, month).ToArray(), "application/vnd.ms-excel", "Applicant Survey Summary Report.xlsx")); }
public IHttpActionResult exportReport(Guid orgId, Guid projId, Guid? locId) { DateTime? startDate = grabStartDate(); DateTime? endDate = grabEndDate(); return Ok(ExportReport.build(orgId, projId, locId, startDate, endDate)); } // exportReport
/// <summary> /// Identificates and exports Facebook objects from conversation. /// </summary> protected override void ProcessConversation() { // for every snooperExport foreach (var snooperExportBase in this.SourceExports) { foreach (var exportedObject in snooperExportBase.ExportObjects) { this.OnBeforeProtocolParsing(); var httpObject = exportedObject as SnooperExportedDataObjectHTTP; if (httpObject == null) { break; // for exports from invalid snooper } var msg = httpObject.Message; var httpContent = msg.HTTPContent; // every facebook message has content if (httpContent?.Content == null) { continue; } // check for facebook status var header = msg.HTTPHeader as HttpRequestHeader; if (header != null) { var requestUri = header.RequestURI; if (requestUri.Contains("updatestatus.php")) { this.OnAfterProtocolParsing(); this.OnBeforeDataExporting(); var parsedStatus = GetFacebookStatus(msg, this.SnooperExport); parsedStatus.ExportSources.Add(exportedObject.ExportSource); // export this.SnooperExport.AddExportObject(parsedStatus); this.OnAfterDataExporting(); continue; } } // strip anti json hijack protection from json var strippedContent = Encoding.Default.GetString(httpContent.Content).Substring(9); try { JObject.Parse(strippedContent); } catch (Exception) { // not a facebook message continue; } var msgJson = JObject.Parse(strippedContent); var index = 0; var type = GetMessageType(msgJson, ref index); // facebook messenger message switch (type) { case "message": this.OnAfterProtocolParsing(); this.OnBeforeDataExporting(); var facebookMessage = GetFacebookMessage(msgJson, this.SnooperExport, index); facebookMessage.ExportSources.Add(exportedObject.ExportSource); // export this.SnooperExport.AddExportObject(facebookMessage); this.OnAfterDataExporting(); break; case "comment": this.OnAfterProtocolParsing(); this.OnBeforeDataExporting(); var facebookComment = GetFacebookComment(msgJson, this.SnooperExport, index); facebookComment.ExportSources.Add(exportedObject.ExportSource); // export this.SnooperExport.AddExportObject(facebookComment); this.OnAfterDataExporting(); break; case "group": this.OnAfterProtocolParsing(); this.OnBeforeDataExporting(); var facebookGroupMessage = GetFacebookGroupMessage(msgJson, this.SnooperExport, index); facebookGroupMessage.ExportSources.Add(exportedObject.ExportSource); // export this.SnooperExport.AddExportObject(facebookGroupMessage); this.OnAfterDataExporting(); break; case "file": this.OnAfterProtocolParsing(); var attachmentType = (string)msgJson["ms"][index]["message"]["attachments"][0]["attach_type"]; switch (attachmentType) { case "photo": this.OnBeforeDataExporting(); var parsedPhoto = GetFacebookMessengerPhoto(msgJson, this.SnooperExport, index); parsedPhoto.ExportSources.Add(exportedObject.ExportSource); // export this.SnooperExport.AddExportObject(parsedPhoto); this.OnAfterDataExporting(); break; case "file": this.OnBeforeDataExporting(); var facebookFile = GetFacebookMessengerFile(msgJson, this.SnooperExport, index); facebookFile.ExportSources.Add(exportedObject.ExportSource); // export this.SnooperExport.AddExportObject(facebookFile); this.OnAfterDataExporting(); break; // Unknown facebook message filetype default: Debug.WriteLine(@"Unknown facebook message filetype"); this.SnooperExport.Reports.Add(new ExportReport() { Level = ExportReport.ReportLevel.Error, Description = "Unknown facebook message filetype" }); break; } var fileText = (string)msgJson["ms"][index]["message"]["body"]; // check if file containted message if (!string.IsNullOrEmpty(fileText)) { this.OnBeforeDataExporting(); var message = GetFacebookMessage(msgJson, this.SnooperExport, index); message.ExportSources.Add(exportedObject.ExportSource); // export this.SnooperExport.AddExportObject(message); this.OnAfterDataExporting(); } break; case "groupfile": this.OnAfterProtocolParsing(); var attachmentGroupType = (string)msgJson["ms"][index]["message"]["attachments"][0]["attach_type"]; switch (attachmentGroupType) { case "photo": this.OnBeforeDataExporting(); var parsedPhoto = GetFacebookMessengerGroupPhoto(msgJson, this.SnooperExport, index); parsedPhoto.ExportSources.Add(exportedObject.ExportSource); // export this.SnooperExport.AddExportObject(parsedPhoto); this.OnAfterDataExporting(); break; case "file": this.OnBeforeDataExporting(); var facebookFile = GetFacebookMessengerGroupFile(msgJson, this.SnooperExport, index); facebookFile.ExportSources.Add(exportedObject.ExportSource); // export this.SnooperExport.AddExportObject(facebookFile); this.OnAfterDataExporting(); break; // Unknown attachment type default: var report = new ExportReport { Description = "Unknown attachemnt type in Facebook Groupfile", Level = ExportReport.ReportLevel.Error }; this.SnooperExport.Reports.Add(report); break; } var groupText = (string)msgJson["ms"][index]["message"]["body"]; if (!string.IsNullOrEmpty(groupText)) { this.OnBeforeDataExporting(); var groupMessage = GetFacebookGroupMessage(msgJson, this.SnooperExport, index); groupMessage.ExportSources.Add(exportedObject.ExportSource); // export this.SnooperExport.AddExportObject(groupMessage); this.OnAfterDataExporting(); } break; case "sent_push": this.OnAfterProtocolParsing(); this.OnBeforeDataExporting(); var sentEvent = GetFacebookEventSentPush(msgJson, this.SnooperExport, index); sentEvent.ExportSources.Add(exportedObject.ExportSource); // export this.SnooperExport.AddExportObject(sentEvent); this.OnAfterDataExporting(); break; case "read_receipt": this.OnAfterProtocolParsing(); this.OnBeforeDataExporting(); var readReceipt = GetFacebookEventReadReceipt(msgJson, this.SnooperExport, index); readReceipt.ExportSources.Add(exportedObject.ExportSource); // export this.SnooperExport.AddExportObject(readReceipt); this.OnAfterDataExporting(); break; case "read": this.OnAfterProtocolParsing(); this.OnBeforeDataExporting(); var readEvent = GetFacebookEventRead(msgJson, this.SnooperExport, index); readEvent.ExportSources.Add(exportedObject.ExportSource); // export this.SnooperExport.AddExportObject(readEvent); this.OnAfterDataExporting(); break; case "typing": this.OnAfterProtocolParsing(); this.OnBeforeDataExporting(); var typingEvent = GetFacebookEventTyping(msgJson, this.SnooperExport, index); typingEvent.ExportSources.Add(exportedObject.ExportSource); // export this.SnooperExport.AddExportObject(typingEvent); this.OnAfterDataExporting(); break; default: // not a facebook message continue; } } } }
public ExportReportVm(ExportReport model, ExportVm exportResultVm, IWindsorContainer investigationWindsorContainer) : base(investigationWindsorContainer, model) { this.ExportReport = model; this.ExportVm = exportResultVm; }