Table of Contents

Interface IObjectLifecycle

Namespace
RDCore.SDK.Runtime.Abstract.Execution
Assembly
RDCore.SDK.dll

Raises the lifecycle events of a class instance (MS-VBAL §5.3.1.10) by dispatching the members of ClassLifecycleInterface to whatever the instance's class implements them with.

public interface IObjectLifecycle

Remarks

A class that handles neither event is the common case, and raising an event it does not handle does nothing and is not an error. A lifecycle is the session's, not a call site's, so what raises these events is the creation and release of an instance, never user code.

Methods

Initialize(VBRuntimeObjectId)

Raises Initialize on instance, which has just been created and has not been returned to anything yet.

RuntimeSemanticsEvaluationResult Initialize(VBRuntimeObjectId instance)

Parameters

instance VBRuntimeObjectId

Returns

RuntimeSemanticsEvaluationResult

The outcome of the handler; an error the handler leaves unhandled is the creating operation's own.

Terminate(VBRuntimeObjectId)

Raises Terminate on instance, which is about to be destroyed. Whether it should run at all is the caller's to decide (TryBeginTerminate(VBRuntimeObjectId)).

RuntimeSemanticsEvaluationResult Terminate(VBRuntimeObjectId instance)

Parameters

instance VBRuntimeObjectId

Returns

RuntimeSemanticsEvaluationResult

The outcome of the handler.