Show / Hide Table of Contents

Interface IUserDataType

As a convenience, every type deriving from IUserDataType is "self-described". That is, no descriptor is needed/generated and the object itself is used to describe the type for interop. See also UserData, IUserDataDescriptor and StandardUserDataDescriptor .

Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public interface IUserDataType

Methods

Index(Script, DynValue, Boolean)

Performs an "index" "get" operation.

Declaration
DynValue Index(Script script, DynValue index, bool isDirectIndexing)
Parameters
Script script

The script originating the request

DynValue index

The index.

System.Boolean isDirectIndexing

If set to true, it's indexed with a name, if false it's indexed through brackets.

Returns
DynValue

MetaIndex(Script, String)

Gets a "meta" operation on this userdata. If a descriptor does not support this functionality, it should return "null" (not a nil).

These standard metamethods can be supported (the return value should be a function accepting the classic parameters of the corresponding metamethod): __add, __sub, __mul, __div, __div, __pow, __unm, __eq, __lt, __le, __lt, __len, __concat, __pairs, __ipairs, __iterator, __call

These standard metamethods are supported through other calls for efficiency: __index, __newindex, __tostring

Declaration
DynValue MetaIndex(Script script, string metaname)
Parameters
Script script

The script originating the request

System.String metaname

The name of the metamember.

Returns
DynValue

SetIndex(Script, DynValue, DynValue, Boolean)

Performs an "index" "set" operation.

Declaration
bool SetIndex(Script script, DynValue index, DynValue value, bool isDirectIndexing)
Parameters
Script script

The script originating the request

DynValue index

The index.

DynValue value

The value to be set

System.Boolean isDirectIndexing

If set to true, it's indexed with a name, if false it's indexed through brackets.

Returns
System.Boolean

Back to top Built by Itinero, MIT licensed.