Skip to content

Class MethodDef

Namespace: Apogee.Reflection
Assembly: Apogee.Reflection.dll

public sealed class MethodDef

Inheritance

object ← MethodDef

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Constructors

MethodDef(string, string, bool, ParameterDef[], TypeRef[], MethodInvoker, string?)

public MethodDef(string name, string scriptName, bool isStatic, ParameterDef[] parameters, TypeRef[] results, MethodInvoker invoker, string? doc = null)

Parameters

name string

scriptName string

isStatic bool

parameters ParameterDef[]

results TypeRef[]

invoker MethodInvoker

doc string?

Properties

Doc

public string? Doc { get; }

Property Value

string?

IsStatic

public bool IsStatic { get; }

Property Value

bool

Name

public string Name { get; }

Property Value

string

Parameters

public ParameterDef[] Parameters { get; }

Property Value

ParameterDef[]

Results

The types of the results: empty for void, one per item of a tuple.

public TypeRef[] Results { get; }

Property Value

TypeRef[]

ScriptName

public string ScriptName { get; }

Property Value

string

Methods

Invoke(object?, ReadOnlySpan<Value>, Span<Value>)

Calls the method after checking the argument count; results must hold .Length values.

public void Invoke(object? target, ReadOnlySpan<Value> arguments, Span<Value> results)

Parameters

target object?

arguments ReadOnlySpan<Value>

results Span<Value>