Table of Contents

Class EzrConstructorWrapper

Namespace
EzrSquared.Runtime.Types.Wrappers.Members.Methods
Assembly
ezrSquared-lib.dll

Class to automatically wrap C# constructors so that they can be used in ezrĀ².

public class EzrConstructorWrapper : EzrMethodBaseWrapper<ConstructorInfo>, IEzrObject
Inheritance
object
EzrWrapper<ConstructorInfo>
EzrMethodBaseWrapper<ConstructorInfo>
EzrConstructorWrapper
Implements
Inherited Members

Constructors

EzrConstructorWrapper(Type, ConstructorInfo, Context, Position, Position, bool)

Creates a new EzrConstructorWrapper.

public EzrConstructorWrapper(Type constructingType, ConstructorInfo sharpConstructor, Context parentContext, Position startPosition, Position endPosition, bool skipValidation = false)

Parameters

constructingType Type

This C# constructor's class.

sharpConstructor ConstructorInfo

The constructor to wrap.

parentContext Context

The context in which this object was created.

startPosition Position

The starting position of the object.

endPosition Position

The ending position of the object.

skipValidation bool

Skip method signature validation?

Fields

ConstructingType

This C# constructor's class.

public readonly Type ConstructingType

Field Value

Type

ConstructingTypeName

The name of the constructing type in snake_case.

public readonly string ConstructingTypeName

Field Value

string

Methods

Execute(Reference[], Interpreter, RuntimeResult)

Executes the current object, like a function.

public override void Execute(Reference[] arguments, Interpreter interpreter, RuntimeResult result)

Parameters

arguments Reference[]

The arguments of the execution.

interpreter Interpreter

The interpreter to be used in execution.

result RuntimeResult

Runtime result for carrying the result and any errors.

ToString(RuntimeResult)

Evaluates the current object as a string value.

public override string ToString(RuntimeResult result)

Parameters

result RuntimeResult

Runtime result for carrying any errors.

Returns

string

The evaluated value.