public IEnumerable <byte> GetBytes() { // Get root lob structure bytes var rootLobStructurePage = OriginPage.Database.GetTextMixPage(lobRootSlot.PagePointer); var rootLobRecord = rootLobStructurePage.Records[lobRootSlot.SlotID]; var rootLobStructure = LobStructureFactory.Create(rootLobRecord.FixedLengthData, OriginPage.Database); return(rootLobStructure.GetData()); }
public IEnumerable <byte> GetBytes() { byte[] fieldData = new byte[0]; for (int i = 12; i < data.Length; i += 12) { int length = BitConverter.ToInt32(data, i); int pageID = BitConverter.ToInt32(data, i + 4); short fileID = BitConverter.ToInt16(data, i + 8); short slot = BitConverter.ToInt16(data, i + 10); // Get referenced page data var textMixPage = OriginPage.Database.GetTextMixPage(new PagePointer(fileID, pageID)); var referencedData = textMixPage.Records[slot].FixedLengthData; // Get lob structure and retrieve data var lobStructure = LobStructureFactory.Create(referencedData, OriginPage.Database); fieldData = fieldData.Concat(lobStructure.GetData()).ToArray(); } return(fieldData); }