C# Класс Pchp.CodeAnalysis.Symbols.OverrideHelper

Helper class resolving overriden method.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
CanBeOverride ( SourceMethodSymbol method, MethodSymbol basemethod ) : bool

Determines whether method can override basemethod.

OverrideCost ( SourceMethodSymbol method, MethodSymbol basemethod ) : ConversionCost

Calculates override cost, i.e. whether the override is possible and its value. In case of more possible overrides, the one with better cost is selected.

ResolveOverride ( this method ) : MethodSymbol

Resolves best method to be overriden.

SignaturesMatch ( this a, MethodSymbol b ) : bool

Checks whether signatures of two methods match exactly so one can override the second.

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

Метод Описание
EnumerateOverridableTypes ( NamedTypeSymbol type ) : IEnumerable

Enumerates base types and interfaces of given type (i.e. types that can contain methods that can be overriden).

IsAllowedCost ( ConversionCost cost ) : bool

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

CanBeOverride() публичный статический Метод

Determines whether method can override basemethod.
public static CanBeOverride ( SourceMethodSymbol method, MethodSymbol basemethod ) : bool
method SourceMethodSymbol Source method.
basemethod MethodSymbol Overriden method.
Результат bool

OverrideCost() публичный статический Метод

Calculates override cost, i.e. whether the override is possible and its value. In case of more possible overrides, the one with better cost is selected.
public static OverrideCost ( SourceMethodSymbol method, MethodSymbol basemethod ) : ConversionCost
method SourceMethodSymbol Source method.
basemethod MethodSymbol A hypothetical base method.
Результат ConversionCost

ResolveOverride() публичный статический Метод

Resolves best method to be overriden.
public static ResolveOverride ( this method ) : MethodSymbol
method this The override.
Результат MethodSymbol

SignaturesMatch() публичный статический Метод

Checks whether signatures of two methods match exactly so one can override the second.
public static SignaturesMatch ( this a, MethodSymbol b ) : bool
a this
b MethodSymbol
Результат bool