C# Класс Pchp.CodeAnalysis.Symbols.PE.MemberRefMetadataDecoder

This subclass of MetadataDecoder is specifically for finding method symbols corresponding to method MemberRefs. The parent implementation is unsuitable because it requires a PEMethodSymbol for context when decoding method type parameters and no such context is available because it is precisely what we are trying to find. Since we know in advance that there will be no context and that signatures decoded with this class will only be used for comparison (when searching through the methods of a known TypeSymbol), we can return indexed type parameters instead.
Наследование: MetadataDecoder
Показать файл Открыть проект

Открытые методы

Метод Описание
MemberRefMetadataDecoder ( PEModuleSymbol moduleSymbol, TypeSymbol containingType ) : Microsoft.CodeAnalysis

Защищенные методы

Метод Описание
GetGenericMethodTypeParamSymbol ( int position ) : TypeSymbol

We know that we'll never have a method context because that's what we're trying to find. Instead, just return an indexed type parameter that will make comparison easier.

GetGenericTypeParamSymbol ( int position ) : TypeSymbol

This override changes two things: 1) Return type arguments instead of type parameters. 2) Handle non-PE types.

Приватные методы

Метод Описание
CustomModifiersMatch ( ImmutableArray candidateCustomModifiers, ImmutableArray targetCustomModifiers ) : bool
FindFieldBySignature ( TypeSymbol targetTypeSymbol, string targetMemberName, ImmutableArray customModifiers, TypeSymbol type ) : FieldSymbol
FindMember ( TypeSymbol targetTypeSymbol, MemberReferenceHandle memberRef, bool methodsOnly ) : Symbol

Search through the members of a given type symbol to find the method that matches a particular signature.

FindMethodBySignature ( TypeSymbol targetTypeSymbol, string targetMemberName, SignatureHeader targetMemberSignatureHeader, int targetMemberTypeParamCount, ParamInfo targetParamInfo ) : MethodSymbol
GetGenericTypeArgumentSymbol ( int position, NamedTypeSymbol namedType, int &cumulativeArity, TypeSymbol &typeArgument ) : void
MethodSymbolMatchesParamInfo ( MethodSymbol candidateMethod, ParamInfo targetParamInfo ) : bool
ParametersMatch ( ParameterSymbol candidateParam, TypeMap candidateMethodTypeMap, ParamInfo &targetParam ) : bool
ReturnTypesMatch ( MethodSymbol candidateMethod, TypeMap candidateMethodTypeMap, ParamInfo &targetReturnParam ) : bool

Описание методов

GetGenericMethodTypeParamSymbol() защищенный Метод

We know that we'll never have a method context because that's what we're trying to find. Instead, just return an indexed type parameter that will make comparison easier.
protected GetGenericMethodTypeParamSymbol ( int position ) : TypeSymbol
position int
Результат TypeSymbol

GetGenericTypeParamSymbol() защищенный Метод

This override changes two things: 1) Return type arguments instead of type parameters. 2) Handle non-PE types.
protected GetGenericTypeParamSymbol ( int position ) : TypeSymbol
position int
Результат TypeSymbol

MemberRefMetadataDecoder() публичный Метод

public MemberRefMetadataDecoder ( PEModuleSymbol moduleSymbol, TypeSymbol containingType ) : Microsoft.CodeAnalysis
moduleSymbol PEModuleSymbol
containingType TypeSymbol
Результат Microsoft.CodeAnalysis