public BlobReader Skip() { BlobReader reader = _reader; reader.ReadSignatureHeader(); int parameterCount = reader.ReadCompressedInteger(); while (reader.IsCustomModifier()) { reader = new CustomModifierSignature(reader).Skip(); } reader = new TypeSignature(reader).Skip(); for (int i = 0; i < parameterCount; i++) { reader = new ParameterSignature(reader).Skip(); } return(reader); }
public BlobReader Skip() { BlobReader reader = _reader; var header = reader.ReadSignatureHeader(); // skip the GenParamCount if present if (header.IsGeneric) { reader.ReadCompressedInteger(); } // read the ParamCount int parameterCount = reader.ReadCompressedInteger(); // skip the RetType reader = new ReturnTypeSignature(reader).Skip(); for (int i = 0; i < parameterCount; i++) { reader = new ParameterSignature(reader).Skip(); } return(reader); }
public BlobReader Skip() { BlobReader reader = _reader; reader.ReadSignatureHeader(); int parameterCount = reader.ReadCompressedInteger(); while (reader.IsCustomModifier()) reader = new CustomModifierSignature(reader).Skip(); reader = new TypeSignature(reader).Skip(); for (int i = 0; i < parameterCount; i++) reader = new ParameterSignature(reader).Skip(); return reader; }
public BlobReader Skip() { BlobReader reader = _reader; var header = reader.ReadSignatureHeader(); // skip the GenParamCount if present if (header.IsGeneric) reader.ReadCompressedInteger(); // read the ParamCount int parameterCount = reader.ReadCompressedInteger(); // skip the RetType reader = new ReturnTypeSignature(reader).Skip(); for (int i = 0; i < parameterCount; i++) reader = new ParameterSignature(reader).Skip(); return reader; }
private bool IsSameParameterSignature(MetadataReader referenceMetadata, MetadataReader newMetadata, ParameterSignature referenceSignatureReader, ParameterSignature newSignatureReader) { if (!referenceSignatureReader.CustomModifiers.IsEmpty || !newSignatureReader.CustomModifiers.IsEmpty) throw new NotImplementedException(); if (referenceSignatureReader.TypeCode != newSignatureReader.TypeCode) return false; switch (referenceSignatureReader.TypeCode) { case SignatureTypeCode.TypedReference: return true; default: if (referenceSignatureReader.IsByRef != newSignatureReader.IsByRef) return false; return IsSameTypeSignature(referenceMetadata, newMetadata, referenceSignatureReader.Type, newSignatureReader.Type); } }