/// <summary> /// Reads a <c>TypeDefOrRef</c> /// </summary> /// <returns>A <see cref="ITypeDefOrRef"/> instance</returns> ITypeDefOrRef ReadTypeDefOrRef() { if (!reader.TryReadCompressedUInt32(out uint codedToken)) { return(null); } return(helper.ResolveTypeDefOrRef(codedToken, gpContext)); }
/// <summary> /// Reads a <c>TypeDefOrRef</c> /// </summary> /// <returns>A <see cref="ITypeDefOrRef"/> instance</returns> ITypeDefOrRef ReadTypeDefOrRef() { uint codedToken; if (!reader.ReadCompressedUInt32(out codedToken)) { return(null); } return(helper.ResolveTypeDefOrRef(codedToken)); }
ITypeDefOrRef ReadTypeDefOrRef(bool allowTypeSpec) { if (!reader.TryReadCompressedUInt32(out uint codedToken)) { return(null); } if (!allowTypeSpec && CodedToken.TypeDefOrRef.Decode2(codedToken).Table == Table.TypeSpec) { return(null); } return(helper.ResolveTypeDefOrRef(codedToken, default)); }
TypeSig ReadTypeDefOrRefSig() { uint codedToken; if (!reader.TryReadCompressedUInt32(out codedToken)) { return(null); } ISignatureReaderHelper helper = module; var tdr = helper.ResolveTypeDefOrRef(codedToken, gpContext); return(tdr.ToTypeSig()); }
ITypeDefOrRef ReadTypeDefOrRef() { uint codedToken; if (!reader.TryReadCompressedUInt32(out codedToken)) { return(null); } ISignatureReaderHelper helper = module; var tdr = helper.ResolveTypeDefOrRef(codedToken, gpContext); var corType = module.CorLibTypes.GetCorLibTypeSig(tdr); if (corType != null) { return(corType.TypeDefOrRef); } return(tdr); }