Class EzrFieldWrapper
- Namespace
- EzrSquared.Runtime.Types.Wrappers.Members
- Assembly
- ezrSquared-lib.dll
Class to automatically wrap C# fields so that they can be used in ezrĀ².
public class EzrFieldWrapper : EzrWrapper<FieldInfo>, IEzrObject
- Inheritance
-
objectEzrWrapper<FieldInfo>EzrFieldWrapper
- Implements
- Inherited Members
Constructors
EzrFieldWrapper(FieldInfo, object?, Context, Position, Position)
Creates a new EzrFieldWrapper.
public EzrFieldWrapper(FieldInfo sharpField, object? instance, Context parentContext, Position startPosition, Position endPosition)
Parameters
sharpField
FieldInfoThe field to wrap.
instance
objectThe object which contains the field, null if static.
parentContext
ContextThe context in which this object was created.
startPosition
PositionThe starting position of the object.
endPosition
PositionThe 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 field's value. If the field is not read-only and there is an arguments, sets the field's value.
public override void Execute(Reference[] arguments, Interpreter interpreter, RuntimeResult result)
Parameters
arguments
Reference[]The arguments of the execution.
interpreter
InterpreterThe interpreter to be used in execution.
result
RuntimeResultRuntime 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
RuntimeResultRuntime result for carrying any errors.
Returns
- string
The evaluated value.