1 instantiation of MDTables
System.AddIn (1)
System\Addin\MiniReflection\MetadataReader\PEFileReader.cs (1)
231metaData = new MDTables(B, stringStream, blobStream);
93 references to MDTables
System.AddIn (93)
System\Addin\MiniReflection\MetadataReader\Metadata.cs (3)
13public MDTables.Tables Table; 16public MetadataToken(MDTables.Tables table, UInt32 index) 26return String.Format(CultureInfo.InvariantCulture, "Table {0} ({1}), entry {2}", MDTables.Names[(Int32)Table], (UInt32)Table, Index);
System\Addin\MiniReflection\MetadataReader\PEFileReader.cs (3)
54private MDTables metaData; 148internal MDTables MetaData { 349MetaData.SeekToRowOfTable(MDTables.Tables.XAssembly, 0U);
System\Addin\MiniReflection\MiniAssembly.cs (12)
75MDTables metaData = _peFile.MetaData; 77for(uint i=0; i<metaData.RowsInTable(MDTables.Tables.File); i++) 79metaData.SeekToRowOfTable(MDTables.Tables.File, i); 103private static MetadataToken FindTypeDef(PEFileReader peFile, MDTables mdScope, String typeName, String nameSpace) 107uint numTypeDefs = mdScope.RowsInTable(MDTables.Tables.TypeDef); 109mdScope.SeekToRowOfTable(MDTables.Tables.TypeDef, i); 117return new MetadataToken(MDTables.Tables.TypeDef, i + 1); 143System.Diagnostics.Contracts.Contract.Requires(token.Table == MDTables.Tables.AssemblyRef); 145MDTables metaData = peFile.MetaData; 256System.Diagnostics.Contracts.Contract.Requires(assemblyRefB.Table == MDTables.Tables.AssemblyRef); 277System.Diagnostics.Contracts.Contract.Requires(assemblyRef.Table == MDTables.Tables.AssemblyRef); 278MDTables metaData = peFile.MetaData;
System\Addin\MiniReflection\MiniModule.cs (13)
98uint rowsGeneric = _peFile.MetaData.RowsInTable(MDTables.Tables.GenericParam); 101_peFile.MetaData.SeekToRowOfTable(MDTables.Tables.GenericParam, i); 104MetadataToken genericTypeToken = _peFile.MetaData.ReadMetadataToken(MDTables.Encodings.TypeOrMethodDef); // owner 126MDTables MetaData = _peFile.MetaData; 134uint numRows = MetaData.RowsInTable(MDTables.Tables.CustomAttribute); 137MetaData.SeekToRowOfTable(MDTables.Tables.CustomAttribute, i); 140MetadataToken targetType = MetaData.ReadMetadataToken(MDTables.Encodings.HasCustomAttribute); 141MetadataToken caType = MetaData.ReadMetadataToken(MDTables.Encodings.CustomAttributeType); 149if (caType.Table != MDTables.Tables.MemberRef) 153System.Diagnostics.Contracts.Contract.Assert(caType.Table == MDTables.Tables.MethodDef); 156MetadataToken customAttributeType = MetaData.ReadMetadataToken(MDTables.Encodings.MemberRefParent); 159MetadataToken resolutionScope = MetaData.ReadMetadataToken(MDTables.Encodings.ResolutionScope); 171case MDTables.Tables.TypeDef:
System\Addin\MiniReflection\TypeInfo.cs (62)
79System.Diagnostics.Contracts.Contract.Requires(typeDef.Table == MDTables.Tables.TypeDef); 85MDTables mdScope = peFile.MetaData; 98System.Diagnostics.Contracts.Contract.Requires(typeDef.Table == MDTables.Tables.TypeDef); 113System.Diagnostics.Contracts.Contract.Requires(typeDef.Table == MDTables.Tables.TypeDef); 137System.Diagnostics.Contracts.Contract.Requires(typeRefToken.Table == MDTables.Tables.TypeRef); 144MDTables MetaData = peFile.MetaData; 146MetadataToken assemblyRef = MetaData.ReadMetadataToken(MDTables.Encodings.ResolutionScope); 318MDTables mdScope = peFile.MetaData; 421MDTables mdScope = peFile.MetaData; 435MetadataToken baseClass = peFile.MetaData.ReadMetadataToken(MDTables.Encodings.TypeDefOrRef); 442if (token.Table == MDTables.Tables.TypeRef) 447else if (token.Table == MDTables.Tables.TypeDef) 480System.Diagnostics.Contracts.Contract.Assert(_mdToken.Table == MDTables.Tables.TypeDef); 484MDTables MetaData = peFile.MetaData; 495MetadataToken baseClass = MetaData.ReadMetadataToken(MDTables.Encodings.TypeDefOrRef); // Base class 496uint firstMemberIndex = MetaData.ReadRowIndex(MDTables.Tables.FieldDef); // Field list 497uint firstMethodIndex = MetaData.ReadRowIndex(MDTables.Tables.MethodDef); // Method list 501if (_mdToken.Index == MetaData.RowsInTable(MDTables.Tables.TypeDef)) 503lastMethodIndex = MetaData.RowsInTable(MDTables.Tables.MethodDef); 507MetaData.SeekToRowOfTable(MDTables.Tables.TypeDef, _mdToken.Index); // Seek to next type (not off by 1!) 511MetaData.ReadMetadataToken(MDTables.Encodings.TypeDefOrRef); // Next type's base class 512MetaData.ReadRowIndex(MDTables.Tables.FieldDef); // field list; 513uint firstMethodOfNextType = MetaData.ReadRowIndex(MDTables.Tables.MethodDef); // method list 520MetadataToken method = new MetadataToken(MDTables.Tables.MethodDef, i); 559MDTables MetaData = peFile.MetaData; 678MDTables.Tables[] mapToTable = new MDTables.Tables[]{MDTables.Tables.TypeDef, MDTables.Tables.TypeRef, MDTables.Tables.TypeSpec}; 743MDTables thisMetaData = peFile.MetaData; 745if (_mdToken.Table == MDTables.Tables.TypeRef) 752System.Diagnostics.Contracts.Contract.Assert(_mdToken.Table == MDTables.Tables.TypeDef); 760System.Diagnostics.Contracts.Contract.Requires(typeDefToken.Table == MDTables.Tables.TypeDef); 762MDTables mdScope = peFile.MetaData; 768uint numRows = mdScope.RowsInTable(MDTables.Tables.InterfaceImpl); 771mdScope.SeekToRowOfTable(MDTables.Tables.InterfaceImpl, i); 772uint typeDefRow = mdScope.ReadRowIndex(MDTables.Tables.TypeDef); 776MetadataToken interfaceToken = mdScope.ReadMetadataToken(MDTables.Encodings.TypeDefOrRef); 783case MDTables.Tables.TypeRef: 785MetadataToken resolutionScope = mdScope.ReadMetadataToken(MDTables.Encodings.ResolutionScope); 797case MDTables.Tables.TypeDef: 814case MDTables.Tables.TypeSpec: 837System.Diagnostics.Contracts.Contract.Requires(typeRef.Table == MDTables.Tables.TypeRef); 841MDTables thisMetaData = peFile.MetaData; 843MetadataToken resolutionScope = thisMetaData.ReadMetadataToken(MDTables.Encodings.ResolutionScope); 846System.Diagnostics.Contracts.Contract.Assert(resolutionScope.Table == MDTables.Tables.AssemblyRef); 884System.Diagnostics.Contracts.Contract.Assert(_mdToken.Table == MDTables.Tables.TypeDef); 887MDTables mdScope = peFile.MetaData; 891uint numRows = mdScope.RowsInTable(MDTables.Tables.InterfaceImpl); 896mdScope.SeekToRowOfTable(MDTables.Tables.InterfaceImpl, i); 897uint typeDefRow = mdScope.ReadRowIndex(MDTables.Tables.TypeDef); 900MetadataToken interfaceToken = mdScope.ReadMetadataToken(MDTables.Encodings.TypeDefOrRef); 953MDTables metaData = peFile.MetaData; 955uint numRows = metaData.RowsInTable(MDTables.Tables.CustomAttribute); 958metaData.SeekToRowOfTable(MDTables.Tables.CustomAttribute, i); 961MetadataToken targetType = metaData.ReadMetadataToken(MDTables.Encodings.HasCustomAttribute); 962MetadataToken caType = metaData.ReadMetadataToken(MDTables.Encodings.CustomAttributeType); 972if (caType.Table != MDTables.Tables.MemberRef) 976System.Diagnostics.Contracts.Contract.Assert(caType.Table == MDTables.Tables.MethodDef); 980MetadataToken customAttributeType = metaData.ReadMetadataToken(MDTables.Encodings.MemberRefParent); 984MetadataToken resolutionScope = metaData.ReadMetadataToken(MDTables.Encodings.ResolutionScope);