public override void Parse(CLRMetaDataParser parser) { Number = parser.ReadU16(); uint flags = parser.ReadU16(); Owner = parser.ReadTypeOrMethodDef(); Name = parser.ReadString(); Constraints = new List<CLRGenericParamConstraintRow>(); Variance = (VarianceEnum)(flags & 0x3); ReferenceTypeConstraint = ((flags & 0x4) != 0); NotNullableValueTypeConstraint = ((flags & 0x8) != 0); DefaultConstructorConstraint = ((flags & 0x10) != 0); }
public override void Parse(CLRMetaDataParser parser) { if (parser.ReadU16() != 0) throw new ParseFailedException("Bad Generation value"); Name = parser.ReadString(); Mvid = parser.ReadGuid(); CLRGuid encId = parser.ReadGuid(); CLRGuid encBaseId = parser.ReadGuid(); if (encId != null || encBaseId != null) throw new ParseFailedException("Unexpected EncId/EncBaseId values"); }
public override void Parse(CLRMetaDataParser parser) { uint semantics = parser.ReadU16(); Setter = ((semantics & 0x1) != 0); Getter = ((semantics & 0x2) != 0); Other = ((semantics & 0x4) != 0); AddOn = ((semantics & 0x8) != 0); RemoveOn = ((semantics & 0x10) != 0); Fire = ((semantics & 0x20) != 0); Method = (CLRMethodDefRow)parser.ReadTable(CLRMetaDataTables.TableIndex.MethodDef); Association = parser.ReadHasSemantics(); }
public override void Parse(CLRMetaDataParser parser) { MajorVersion = parser.ReadU16(); MinorVersion = parser.ReadU16(); BuildNumber = parser.ReadU16(); RevisionNumber = parser.ReadU16(); uint flags = parser.ReadU32(); PublicKeyOrToken = parser.ReadBlob(); Name = parser.ReadString(); Culture = parser.ReadString(); HashValue = parser.ReadBlob(); HasPublicKey = ((flags & 0x1) != 0); Retargetable = ((flags & 0x100) != 0); DisableJITcompileOptimizer = ((flags & 0x4000) != 0); EnableJITcompileTracking = ((flags & 0x8000) != 0); }
public CLRTableRow Parse(CLRMetaDataParser parser, CLRMetaDataTables tables) { uint code = parser.ReadU16(); uint tag = (code & m_tagMask); if (tag > m_maxTag) throw new ParseFailedException("Invalid coded tag"); ICLRTable table = tables.GetTable((int)m_tableIndexes[tag]); if (table.NumRows > m_maxCompactRows) { uint highCode = parser.ReadU16(); code |= (highCode << 16); } uint row = code >> (int)m_tagBits; if (row == 0) return null; return table.GetRow(row - 1); }
public override void Parse(CLRMetaDataParser parser) { HashAlgId = (AssemblyHashAlgorithm)parser.ReadU32(); if (HashAlgId != AssemblyHashAlgorithm.None && HashAlgId != AssemblyHashAlgorithm.ReservedMD5 && HashAlgId != AssemblyHashAlgorithm.SHA1) throw new ParseFailedException("Unknown hash algorith"); MajorVersion = parser.ReadU16(); MinorVersion = parser.ReadU16(); BuildNumber = parser.ReadU16(); RevisionNumber = parser.ReadU16(); uint flags = parser.ReadU32(); PublicKey = parser.ReadBlob(); Name = parser.ReadString(); Culture = parser.ReadString(); HasPublicKey = ((flags & 0x1) != 0); Retargetable = ((flags & 0x100) != 0); DisableJITcompileOptimizer = ((flags & 0x4000) != 0); EnableJITcompileTracking = ((flags & 0x8000) != 0); }
public override void Parse(CLRMetaDataParser parser) { PackingSize = parser.ReadU16(); ClassSize = parser.ReadU32(); Parent = (CLRTypeDefRow)parser.ReadTable(CLRMetaDataTables.TableIndex.TypeDef); }