public CLRSigCustomMod(CLRSignatureParser parser) { byte token = parser.NextByte(); parser.ConsumeByte(); if (token == 0x1f) IsOptional = false; else if (token == 0x20) IsOptional = true; else throw new ParseFailedException("Strange custom mod token"); IndexedType = parser.ReadTypeDefOrRefOrSpecEncoded(); throw new NotSupportedException("Custom modifiers are not supported"); }
public CLRSigTypeStructured(ElementType type, CLRSignatureParser parser) { BasicType = type; TypeDefOrRefOrSpec = parser.ReadTypeDefOrRefOrSpecEncoded(); }
public CLRSigTypeGenericInstantiation(ElementType type, CLRSignatureParser parser) { BasicType = type; ElementType instType = (ElementType)parser.NextByte(); parser.ConsumeByte(); if (instType == ElementType.CLASS) InstantiationType = InstType.Class; else if (instType == ElementType.VALUETYPE) InstantiationType = InstType.ValueType; else throw new ParseFailedException("Unexpected instantiation type"); GenericType = parser.ReadTypeDefOrRefOrSpecEncoded(); uint genArgCount = parser.ReadCompressedUInt(); ArgTypes = new CLRSigType[genArgCount]; for (uint i = 0; i < genArgCount; i++) ArgTypes[i] = CLRSigType.Parse(parser, false); }