Exemplo n.º 1
0
        IStructuralNodeTemplate CreateTableListNode(MetaDataTableCodes[] codes, HeapSizeFlags heapSizes)
        {
            var tables     = new CompoundNodeTemplate();
            var statistics = new MetaDataTableStatistics(GetRowCounts(codes), heapSizes);

            for (var i = 0; i < codes.Length; i++)
            {
                var code     = codes[i];
                var rowCount = statistics.GetRowCount(code);

                if (rowCount <= 0)
                {
                    continue;
                }

                var rowTemplate = CreateRowTemplate(statistics, code);

                if (rowTemplate == null)
                {
                    tables.Add(code + " Not Yet Implemented", StandardTemplates.UInt8);
                    return(tables);
                }

                tables.Add(code.ToString(), new RepeatingNodeTemplate(rowTemplate, rowCount, GetMetaDataTokenFormatter(code)));
            }

            return(tables);
        }
Exemplo n.º 2
0
        public void Load()
        {
            MetadataReader rdr = new MetadataReader(str);

            str.Position = 0;
            res          = rdr.ReadUInt32();
            maVer        = rdr.ReadByte();
            miVer        = rdr.ReadByte();
            f            = (HeapSizeFlags)rdr.ReadByte();
            res2         = rdr.ReadByte();
            v            = (TableFlags)rdr.ReadUInt64();
            s            = (TableFlags)rdr.ReadUInt64();
            FillLens(rdr);
            FillTables(rdr);
        }
Exemplo n.º 3
0
 public MetaDataTableStatistics(int[] rowCounts, HeapSizeFlags heapSizes)
 {
     _rowCounts = rowCounts;
     _heapSizes = heapSizes;
 }