public static StringsHeap FromStream(MetaDataStream stream) { StringsHeap heap = new StringsHeap(stream); heap.binaryreader = new BinaryReader(new MemoryStream(heap.Contents)); return heap; }
internal Heap(MetaDataStream stream) { name = stream.name; netheader = stream.netheader; offset = stream.offset; size = stream.size; streamoffset = stream.streamoffset; reader = stream.reader; indexsize = 2; }
public TablesDlg(MetaDataStream stream) { InitializeComponent(); tableheap = (TablesHeap)stream.ToHeap(); hexBox1.ByteProvider = new DynamicByteProvider(stream.Contents); // foreach (MetaDataMember member in tableheap.Tables.First(t => t.Type == MetaDataTableType.ManifestResource).Members) // treeView1.Nodes.Add(CreateTreeNode(member)); foreach (MetaDataTable table in tableheap.Tables) { if (table != null) { TreeNode node = new TreeNode(table.Type.ToString() + " (" + table.AmountOfRows.ToString() + ")"); treeView1.Nodes.Add(node); index = 1; foreach (MetaDataMember member in table.Members) node.Nodes.Add(CreateTreeNode(member)); } } }
internal NETTableReader(MetaDataStream stream) { this.stream = stream; reader = new BinaryReader(new MemoryStream(stream.Contents)); tableheap = new TablesHeap(); tableheap.header = ASMGlobals.ReadStructureFromReader<Structures.METADATA_TABLE_HEADER>(reader); tableheap.reader = stream.reader; tableheap.offset = stream.offset; tableheap.size = stream.size; tableheap.stream = stream; tableheap.streamoffset = stream.streamoffset; tableheap.headeroffset = stream.headeroffset; tableheap.netheader = stream.netheader; for (int i = 0; i < 45; i++) if (tableheap.HasTable((MetaDataTableType)i)) { tableheap.tablecount++; } ReadTableHeaders(); tableheap.tablereader = this; // ReadTables(); }
internal GuidHeap(MetaDataStream stream) : base(stream) { }
internal UserStringsHeap(MetaDataStream stream) : base(stream) { }
public static BlobHeap FromStream(MetaDataStream stream) { BlobHeap heap = new BlobHeap(stream); return heap; }
internal BlobHeap(MetaDataStream stream) : base(stream) { this.mainStream = new MemoryStream(Contents); this.mainReader = new BinaryReader(this.mainStream); }
private ValueType GetHeapOffset(MetaDataStream stream, uint index) { if (stream.IndexSize == 4) return index; return (ushort)index; }
public static TablesHeap FromStream(MetaDataStream stream) { NETTableReader reader = new NETTableReader(stream); return reader.tableheap; }
internal object GetHeapOffset(MetaDataStream stream, uint offset) { if (stream.indexsize == 4) return offset; else return (ushort)offset; }
private byte GetIndexSize(MetaDataStream stream) { if (stream != null) return stream.IndexSize; return sizeof(ushort); }