class ScriptAsyncOpBase

Interop class between C++

& CLR for AsyncOpBase and AsyncOp

<T

>.

Public

Constructors

ScriptAsyncOpBase

ScriptAsyncOpBase(const AsyncOp &op, const std::function<MonoObject *(const Any &)> &convertCallback)

Methods

staticGetAssemblyName

static const char *GetAssemblyName()

staticGetNamespace

static const char *GetNamespace()

staticGetTypeName

static const char *GetTypeName()

staticSetupScriptBindings

static void SetupScriptBindings()

staticCreateScriptObject

static MonoObject *CreateScriptObject(bool construct)

staticBindGenericParam

static ::MonoClass *BindGenericParam(::MonoClass *param)

Creates a AsyncOp type with the provided class bound as its template parameter.

GetNativeObject

NativeType &GetNativeObject()

GetLifetimeTrackingMode

virtual ScriptObjectLifetimeTrackingMode GetLifetimeTrackingMode() const

staticCreateScriptObjectAndWrapper

static MonoObject *CreateScriptObjectAndWrapper(const NativeType &nativeObject)

Creates a new script object and a script object wrapper of , and associates them with the provided native object.

Should not be called if already has an associated script object.

~TScriptObjectWrapper<SelfType, BaseType>

virtual ~TScriptObjectWrapper<SelfType, BaseType>() = default

RecreateScriptObjectAfterScriptReload

void RecreateScriptObjectAfterScriptReload() override

staticGetScriptObjectWrapper

static SelfType *GetScriptObjectWrapper(MonoObject *scriptObject)

Returns the script object wrapper associated with the provided script object.

staticGetMetaData

static const ScriptTypeMetaData *GetMetaData()

Returns the meta-data storing information about the script type.

staticInitializeMetaDataAtLoadTime

static void InitializeMetaDataAtLoadTime()

Takes care of initializing the meta-data when the application first load.

The meta-data will be registered with a global manager that will ensure it is kept up-to-date after operations such as assembly (re)load.

Internal

Methods

staticCreateInternal

static MonoObject *CreateInternal(const AsyncOp &op, const std::function<MonoObject *(const Any &)> &convertCallback, u32 rttiId)

staticCreateInternal

static MonoObject *CreateInternal(const AsyncOp &op, const std::function<MonoObject *(const Any &)> &convertCallback)

staticCreateInternal

static MonoObject *CreateInternal(const AsyncOp &op, const std::function<MonoObject *(const Any &)> &convertCallback, MonoClass *returnTypeClass)

Protected

Methods

BindToScriptObject

void BindToScriptObject(MonoObject *scriptObject) override

Stores a pointer to itself in the script object.

This ensures that calls to GetScriptObjectWrapper() can return the script object wrapper associated with the script object.

Fields

mNativeObject

NativeType mNativeObject

Private

Methods

staticInternalIsComplete

static bool InternalIsComplete(ScriptAsyncOpBase *thisPtr)

*********************************************************************

staticInternalBlockUntilComplete

static void InternalBlockUntilComplete(ScriptAsyncOpBase *thisPtr)

staticInternalGetValue

static MonoObject *InternalGetValue(ScriptAsyncOpBase *thisPtr)

Fields

mConvertCallback

std::function<MonoObject *(const Any &)> mConvertCallback