Class EzrMethodBaseWrapper<TMethodBase>
Base class for all automatic wrappers which wrap C# executables so that they can be used in ezr².
public abstract class EzrMethodBaseWrapper<TMethodBase> : EzrWrapper<TMethodBase>, IEzrObject where TMethodBase : MethodBase
Type Parameters
TMethodBase
- Inheritance
-
objectEzrWrapper<TMethodBase>EzrMethodBaseWrapper<TMethodBase>
- Implements
- Derived
- Inherited Members
Constructors
EzrMethodBaseWrapper(TMethodBase, object?, Context, Position, Position, bool)
Creates a new EzrMethodBaseWrapper<TMethodBase>.
public EzrMethodBaseWrapper(TMethodBase sharpMethodBase, object? instance, Context parentContext, Position startPosition, Position endPosition, bool skipValidation)
Parameters
sharpMethodBase
TMethodBaseThe executable to wrap.
instance
objectThe object which contains the executable, null if static.
parentContext
ContextThe parent context.
startPosition
PositionThe starting position of the object.
endPosition
PositionThe ending position of the object.
skipValidation
boolSkip method signature validation?
Fields
AcceptsExtraKeywordArguments
Does this executable accept extra keyword arguments?
public readonly bool AcceptsExtraKeywordArguments
Field Value
- bool
AcceptsExtraPositionalArguments
Does this executable accept extra positional arguments?
public readonly bool AcceptsExtraPositionalArguments
Field Value
- bool
ParameterNames
The names of the exposed parameters of the executable to wrap, in ezr² (snake_case) format.
public readonly string[] ParameterNames
Field Value
- string[]
Parameters
Reflection information about the exposed parameters of the executable to wrap.
public readonly (ParameterInfo Info, bool Optional)[] Parameters
Field Value
- (ParameterInfo Info, bool Optional)[]
RuntimeProvidedParameters
The attributes of the executable's runtime-provided parameters.
public readonly FeatureParameterAttribute[] RuntimeProvidedParameters
Field Value
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
CheckAndPopulateArguments(Reference[], Interpreter, RuntimeResult)
Converts an array of arguments from ezr² code to an array of primitive C# objects in the order the executable expects them in.
protected internal object?[] CheckAndPopulateArguments(Reference[] arguments, Interpreter interpreter, RuntimeResult result)
Parameters
arguments
Reference[]The arguments.
interpreter
InterpreterThe interpreter to be used in execution.
result
RuntimeResultRuntime result for carrying errors.
Returns
- object[]
The array of objects.