示例#1
0
 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);
     }
 }
示例#2
0
 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);
     }
 }
示例#3
0
        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);
            }
        }