Esempio n. 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);
     }
 }
Esempio n. 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);
     }
 }
Esempio n. 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);
            }
        }