/// <inheritdoc /> protected override TypeSignature GetSignature() { var reader = _parentModule.DotNetDirectory.Metadata .GetStream <BlobStream>() .GetBlobReaderByIndex(_row.Signature); var protection = RecursionProtection.CreateNew(); protection.TraversedTokens.Add(MetadataToken); return(TypeSignature.FromReader(_parentModule, reader, protection)); }
/// <summary> /// Reads a type signature from a blob reader. /// </summary> /// <param name="module">The module containing the blob signature.</param> /// <param name="reader">The blob signature reader.</param> /// <returns>The type signature.</returns> /// <exception cref="ArgumentOutOfRangeException">Occurs when the blob reader points to an element type that is /// invalid or unsupported.</exception> public static TypeSignature FromReader(ModuleDefinition module, IBinaryStreamReader reader) => FromReader(module, reader, RecursionProtection.CreateNew());
/// <summary> /// Reads a single dimension array type signature with 0 as a lower bound from an input stream. /// </summary> /// <param name="parentModule">The module containing the signature.</param> /// <param name="reader">The input stream.</param> /// <returns>The signature.</returns> public new static SzArrayTypeSignature FromReader(ModuleDefinition parentModule, IBinaryStreamReader reader) { return(FromReader(parentModule, reader, RecursionProtection.CreateNew())); }