public void MapOffsets(BinMap binMap, Type type) { foreach (var kvp in Properties.Where(kvp => kvp.Value != null)) { binMap.Add(kvp.Value.Offset, kvp.Value.Length, kvp.Key, type.Name); } }
protected BinaryModelBase(OffsetTable offsetTable, BinaryContainer binary, int startOffset) { CacheEnabled = true; _offsetTable = offsetTable; StartOffset = startOffset; BinMap = new BinMap(); //HACK if (offsetTable == null) { return; } Binary = binary ?? new BinaryContainer(offsetTable.Size); EnsureNullTerminatedStrings(); //Temp if (binary != null) { offsetTable.MapOffsets(BinMap, GetType().BaseType); } }