Table of Contents

Class EzrPropertyWrapper

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

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

public class EzrPropertyWrapper : EzrWrapper<PropertyInfo>, IEzrObject
Inheritance
object
EzrWrapper<PropertyInfo>
EzrPropertyWrapper
Implements
Inherited Members

Constructors

EzrPropertyWrapper(PropertyInfo, object?, Context, Position, Position)

Creates a new EzrPropertyWrapper.

public EzrPropertyWrapper(PropertyInfo sharpProperty, object? instance, Context parentContext, Position startPosition, Position endPosition)

Parameters

sharpProperty PropertyInfo

The property to wrap.

instance object

The object which contains the property, null if static.

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.

Properties

Tag

The tag of the type of this object, similar to C# namespace naming conventions.

public override string Tag { get; protected internal set; }

Property Value

string

TypeName

The name of the type of this object, in plain text, all lowercase. Spaces are allowed.

public override string TypeName { get; protected internal set; }

Property Value

string

Methods

Execute(Reference[], Interpreter, RuntimeResult)

If there are no arguments, accesses the property's value. If the property is not read-only and there is an arguments, sets the property's value.

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.