private static void AreEqual(XmlNode tlgNode, string currentPath, OperationData operationData) { var isoSpatialRecords = GetIsoSpatialRecords(tlgNode.Attributes["A"].Value, currentPath).ToList(); var adaptSpatialRecords = operationData.GetSpatialRecords().ToList(); var sections = operationData.GetAllSections(); var meters = sections.SelectMany(x => x.GetWorkingDatas()).ToList(); SpatialRecordAssert.AreEqual(isoSpatialRecords, adaptSpatialRecords, meters); }
private TLG Map(OperationData operationData, string taskDataPath, TaskDocumentWriter taskDocumentWriter) { var tlgId = operationData.Id.FindIsoId() ?? "TLG" + operationData.Id.ReferenceId; taskDocumentWriter.Ids.Add(tlgId, operationData.Id); var tlg = new TLG { A = tlgId}; var sections = operationData.GetAllSections(); var meters = sections.SelectMany(x => x.GetWorkingDatas()).ToList(); var spatialRecords = operationData.GetSpatialRecords != null ? operationData.GetSpatialRecords() : null; var timHeader = _timHeaderMapper.Map(meters); _xmlReader.WriteTlgXmlData(taskDataPath, tlg.A + ".xml", timHeader); var binFilePath = Path.Combine(taskDataPath, tlg.A + ".bin"); _binaryWriter.Write(binFilePath, meters, spatialRecords); return tlg; }
public DataTable ProcessOperationData(OperationData operationData) { _dataTable = new DataTable(); if (operationData.GetSpatialRecords != null) { var spatialRecords = operationData.GetSpatialRecords().ToList(); var meters = GetWorkingData(operationData); CreateColumns(meters); foreach (var spatialRecord in spatialRecords) { CreateRow(meters, spatialRecord); } UpdateColumnNamesWithUom(meters, spatialRecords); } return _dataTable; }