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