void CreateStream(string name) { MetadataStream stream = new MetadataStream(); stream.Header.Name = name; stream.Heap = MetadataHeap.HeapFactory(stream); m_root.Streams.Add(stream); }
public override void VisitMetadataStreamCollection(MetadataStreamCollection coll) { MetadataStream tables = new MetadataStream(); tables.Header.Name = MetadataStream.Tables; tables.Heap = MetadataHeap.HeapFactory(tables); TablesHeap th = tables.Heap as TablesHeap; th.Tables = new TableCollection(th); m_root.Streams.Add(tables); }
private MetadataHeap GetHeap(string name) { for (int i = 0; i < m_items.Count; i++) { MetadataStream stream = m_items [i] as MetadataStream; if (stream.Heap.Name == name) { return(stream.Heap); } } return(null); }
public static MetadataHeap HeapFactory(MetadataStream stream) { switch (stream.Header.Name) { case MetadataStream.Tables: case MetadataStream.IncrementalTables: return(new TablesHeap(stream)); case MetadataStream.GUID: return(new GuidHeap(stream)); case MetadataStream.Strings: return(new StringsHeap(stream)); case MetadataStream.UserStrings: return(new UserStringsHeap(stream)); case MetadataStream.Blob: return(new BlobHeap(stream)); default: return(null); } }
public GuidHeap(MetadataStream stream) : base(stream, MetadataStream.GUID) { int capacity = (int)(stream.Header.Size / 16); m_guids = new Hashtable(capacity); }
internal MetadataHeap(MetadataStream stream, string name) { m_name = name; m_stream = stream; }
internal BlobHeap(MetadataStream stream) : base(stream, MetadataStream.Blob) { }
internal StringsHeap(MetadataStream stream) : base(stream, MetadataStream.Strings) { m_strings = new Hashtable(); }
internal void Remove(MetadataStream value) { m_items.Remove(value); }
internal void Add(MetadataStream value) { m_items.Add(value); }
internal TablesHeap(MetadataStream stream) : base(stream, MetadataStream.Tables) { }