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

Base symbol representing a method or a function from source.
Наследование: MethodSymbol
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
_params ImmutableArray

Private Properties

Свойство Тип Описание
CreateGhostOverload void
GetContextPlace IPlace
GetThisPlace IPlace
IsMetadataNewSlot bool
IsMetadataVirtual bool
SynthesizeGhostStubs void

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

Метод Описание
BuildParameters ( Signature signature, PHPDocBlock phpdocOpt = null ) : IEnumerable

Builds CLR method parameters.

(Context, arg1, arg2, ...)

BuildReturnType ( Signature signature, TypeRef tref, PHPDocBlock phpdocOpt, TypeRefMask rtype ) : TypeSymbol
CreateGhostOverload ( PEModuleBuilder module, DiagnosticBag diagnostic, TypeSymbol ghostreturn, IEnumerable ghostparams, MethodSymbol explicitOverride = null ) : void

Creates ghost stub that calls current method.

CreateTypeRefContext ( ) : TypeRefContext
GenerateGhostBody ( PEModuleBuilder module, DiagnosticBag diagnostic, SynthesizedMethodSymbol ghost ) : void

Generates ghost method body that calls this method.

SynthesizeOverloadsWithOptionalParameters ( PEModuleBuilder module, DiagnosticBag diagnostic ) : void

Synthesizes method overloads in case there are optional parameters which explicit default value cannot be resolved as a ConstantValue.

foo($a = [], $b = [1, 2, 3]) + foo() => foo([], [1, 2, 3) + foo($a) => foo($a, [1, 2, 3])

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

Метод Описание
CreateGhostOverload ( PEModuleBuilder module, DiagnosticBag diagnostic, int pcount ) : void
GetContextPlace ( ) : IPlace

Gets place referring to Pchp.Core.Context object.

GetThisPlace ( ) : IPlace
IsMetadataNewSlot ( bool ignoreInterfaceImplementationChanges = false ) : bool

virtual = IsVirtual AND NewSlot override = IsVirtual AND !NewSlot

IsMetadataVirtual ( bool ignoreInterfaceImplementationChanges = false ) : bool
SynthesizeGhostStubs ( PEModuleBuilder module, DiagnosticBag diagnostic ) : void

Creates ghost stubs, i.e. methods with a different signature calling this routine to comply with CLR standards.

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

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

Builds CLR method parameters.
(Context, arg1, arg2, ...)
protected BuildParameters ( Signature signature, PHPDocBlock phpdocOpt = null ) : IEnumerable
signature System.Signature
phpdocOpt PHPDocBlock
Результат IEnumerable

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

protected BuildReturnType ( Signature signature, TypeRef tref, PHPDocBlock phpdocOpt, TypeRefMask rtype ) : TypeSymbol
signature System.Signature
tref TypeRef
phpdocOpt PHPDocBlock
rtype TypeRefMask
Результат TypeSymbol

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

Creates ghost stub that calls current method.
protected CreateGhostOverload ( PEModuleBuilder module, DiagnosticBag diagnostic, TypeSymbol ghostreturn, IEnumerable ghostparams, MethodSymbol explicitOverride = null ) : void
module PEModuleBuilder
diagnostic DiagnosticBag
ghostreturn TypeSymbol
ghostparams IEnumerable
explicitOverride MethodSymbol
Результат void

CreateTypeRefContext() защищенный абстрактный Метод

protected abstract CreateTypeRefContext ( ) : TypeRefContext
Результат Pchp.CodeAnalysis.FlowAnalysis.TypeRefContext

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

Generates ghost method body that calls this method.
protected GenerateGhostBody ( PEModuleBuilder module, DiagnosticBag diagnostic, SynthesizedMethodSymbol ghost ) : void
module PEModuleBuilder
diagnostic DiagnosticBag
ghost SynthesizedMethodSymbol
Результат void

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

Synthesizes method overloads in case there are optional parameters which explicit default value cannot be resolved as a ConstantValue.
foo($a = [], $b = [1, 2, 3]) + foo() => foo([], [1, 2, 3) + foo($a) => foo($a, [1, 2, 3])
protected SynthesizeOverloadsWithOptionalParameters ( PEModuleBuilder module, DiagnosticBag diagnostic ) : void
module PEModuleBuilder
diagnostic DiagnosticBag
Результат void

Описание свойств

_params защищенное свойство

protected ImmutableArray _params
Результат ImmutableArray