public LargeRootYukon(byte[] bytes, Database database) : base(database) { short type = BitConverter.ToInt16(bytes, 8); if(type != (short)LobStructureType.LARGE_ROOT_YUKON) throw new ArgumentException("Invalid byte structure. Expected LARGE_ROOT_YUKON, found " + type); BlobID = BitConverter.ToInt64(bytes, 0); MaxLinks = BitConverter.ToInt16(bytes, 10); CurLinks = BitConverter.ToInt16(bytes, 12); Level = BitConverter.ToInt16(bytes, 14); DataSlotPointers = new LobSlotPointer[CurLinks]; short offset = 20; for(short i=0; i<CurLinks; i++) { DataSlotPointers[i] = new LobSlotPointer(bytes.Skip(offset).Take(12).ToArray()); offset += 12; } }
public LargeRootYukon(byte[] bytes, Database database) : base(database) { short type = BitConverter.ToInt16(bytes, 8); if (type != (short)LobStructureType.LARGE_ROOT_YUKON) { throw new ArgumentException("Invalid byte structure. Expected LARGE_ROOT_YUKON, found " + type); } BlobID = BitConverter.ToInt64(bytes, 0); MaxLinks = BitConverter.ToInt16(bytes, 10); CurLinks = BitConverter.ToInt16(bytes, 12); Level = BitConverter.ToInt16(bytes, 14); DataSlotPointers = new LobSlotPointer[CurLinks]; short offset = 20; for (short i = 0; i < CurLinks; i++) { DataSlotPointers[i] = new LobSlotPointer(bytes.Skip(offset).Take(12).ToArray()); offset += 12; } }