Click or drag to resize

ScriptReferenceT1, T2, T3 Class

The ScriptReference(T1, T2, T3) class holds references to user callbacks that should be called when the event this ScriptReference refers to occurs. The arguments to the callbacks are of type (T1 sender, T2 arg1, T3 arg2).
Inheritance Hierarchy
SystemObject
  Demo3D.VisualsScriptReference
    Demo3D.VisualsScriptReferenceT1, T2, T3
      More...

Namespace:  Demo3D.Visuals
Assembly:  Demo3D.Core (in Demo3D.Core.dll) Version: 15.0.2.11458
Syntax
C#
public class ScriptReference<T1, T2, T3> : ScriptReference

Type Parameters

T1
The type of the first argument to the event callback.
T2
The type of the second argument to the event callback.
T3
The type of the third argument to the event callback.

The ScriptReferenceT1, T2, T3 type exposes the following members.

Constructors
  NameDescription
Public methodScriptReferenceT1, T2, T3
Initializes a new instance of the ScriptReferenceT1, T2, T3 class
Top
Properties
  NameDescription
Public propertyIsNull
Will a JScript function be called or not when the event occurs.
(Inherited from ScriptReference.)
Protected propertyListenerCount (Inherited from ScriptReference.)
Public propertyName
The JScript function to call on the Script for this visual.
(Inherited from ScriptReference.)
Top
Methods
  NameDescription
Public methodAddFunctionListener
Add a function that will be called when this script reference is invoked. The target visual is prepended to the script reference's original signature such that an event like OnBlocked would expect a function like this to be passed: function (target : Visual, sender : Visual, load : Visual) The functions are cleared upon each reset, removing the need for cleanup. The function list is not persisted upon model save.
(Inherited from ScriptReference.)
Public methodClear
Remove the reference to the JScript function (set Name to an empty string).
(Inherited from ScriptReference.)
Public methodRemoveFunctionListeners
Remove function listeners for a given target Visual.
(Inherited from ScriptReference.)
Public methodToString
The JScript function to be called and whether there are any native listeners.
(Inherited from ScriptReference.)
Top
Events
  NameDescription
Public eventNativeBlockingListeners
Add non-blocking callback delegates to this event (IEnumerable return type).
Public eventNativeListeners
Add blocking callback delegates to this event.
Public eventNativeTaskListeners
Add async callback delegates to this event (async Task return type).
Top
Fields
  NameDescription
Protected fieldwaitForEventDelegates (Inherited from ScriptReference.)
Top
See Also
Inheritance Hierarchy
SystemObject
  Demo3D.VisualsScriptReference
    Demo3D.VisualsScriptReferenceT1, T2, T3
      Demo3D.UtilitiesCustomPropertyScriptReference
      Demo3D.VisualsNotifyMovementStatusScriptReference
      Demo3D.VisualsOnConnectedScriptReference
      Demo3D.VisualsOnExportBindableItemScriptReference
      Demo3D.VisualsOnLoadAddedScriptReference
      Demo3D.VisualsOnLoadRemovedScriptReference
      Demo3D.VisualsOnParentPropertyUpdatedScriptReference
      Demo3D.VisualsOnParentUpdatedScriptReference
      Demo3D.VisualsOnProcessContactScriptReference
      Demo3D.VisualsOnPropertyRenamedScriptReference
      Demo3D.VisualsOnReportCollisionImpulseScriptReference
      Demo3D.VisualsOnSubscribedPropertyUpdatedScriptReference