internal Page(byte[] bytes, int offset) { JetHeader h = new JetHeader(bytes); PageNumber = GetPageNumber((uint)offset, h.PageSize); Checksum = BitConverter.ToUInt64(bytes, 0x00 + offset); LastModificationTime = new JetDbTime(bytes, offset + 0x08); PreviousPageNumber = BitConverter.ToUInt32(bytes, 0x10 + offset); NextPageNumber = BitConverter.ToUInt32(bytes, 0x14 + offset); FatherDataPage = BitConverter.ToUInt32(bytes, 0x18 + offset); AvailableDataSize = BitConverter.ToUInt16(bytes, 0x1C + offset); AvailableUncommittedDataSize = BitConverter.ToUInt16(bytes, 0x1E + offset); FirstAvailableDataOffset = BitConverter.ToUInt16(bytes, 0x20 + offset); FirstAvailablePageTag = BitConverter.ToUInt16(bytes, 0x22 + offset); PageFlags = ((Page.JET_PAGEFLAGS)BitConverter.ToUInt32(bytes, 0x24 + offset)); Tags = DataTag.GetInstances(bytes, offset); }
internal static DataTag[] GetInstances(byte[] bytes, int offset) { List<DataTag> dtList = new List<DataTag>(); bool c = true; for (int i = 0; c; i++) { int o = (offset + 0x1000) - ((i + 1) * 0x04); DataTag dt = new DataTag(bytes, i, (uint)offset, o); if (dt.Length != 0) { dtList.Add(dt); } else { c = false; } } return dtList.ToArray(); }
internal static DataTag[] GetInstances(byte[] bytes, int offset) { List <DataTag> dtList = new List <DataTag>(); bool c = true; for (int i = 0; c; i++) { int o = (offset + 0x1000) - ((i + 1) * 0x04); DataTag dt = new DataTag(bytes, i, (uint)offset, o); if (dt.Length != 0) { dtList.Add(dt); } else { c = false; } } return(dtList.ToArray()); }