OPC Studio User's Guide and Reference
CreateEventArgs Method



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.ComponentModel.Linking Namespace > LinkingTarget Class : CreateEventArgs Method
The type of the event data.

The value of this parameter cannot be null (Nothing in Visual Basic).

The type of the target object.

The value of this parameter can be null (Nothing in Visual Basic).

The data of the event.

The value of this parameter can be null (Nothing in Visual Basic).

The target object of the linking.

The value of this parameter can be null (Nothing in Visual Basic).

Creates a derivation of TargetDataEventArgs with given event data and target object.
Syntax
'Declaration
 
<NotNullAttribute()>
Protected Shared Function CreateEventArgs( _
   ByVal dataType As Type, _
   ByVal targetType As Type, _
   ByVal data As Object, _
   ByVal targetObject As Object _
) As TargetDataEventArgs
'Usage
 
Dim dataType As Type
Dim targetType As Type
Dim data As Object
Dim targetObject As Object
Dim value As TargetDataEventArgs
 
value = LinkingTarget.CreateEventArgs(dataType, targetType, data, targetObject)
[NotNull()]
protected static TargetDataEventArgs CreateEventArgs( 
   Type dataType,
   Type targetType,
   object data,
   object targetObject
)
[NotNull()]
protected:
static TargetDataEventArgs^ CreateEventArgs( 
   Type^ dataType,
   Type^ targetType,
   Object^ data,
   Object^ targetObject
) 

Parameters

dataType
The type of the event data.

The value of this parameter cannot be null (Nothing in Visual Basic).

targetType
The type of the target object.

The value of this parameter can be null (Nothing in Visual Basic).

data
The data of the event.

The value of this parameter can be null (Nothing in Visual Basic).

targetObject
The target object of the linking.

The value of this parameter can be null (Nothing in Visual Basic).

Return Value

The typed event data object with the specified content.

This method never returns null (Nothing in Visual Basic).

Remarks
TargetDataEventArgs<TData> is created when targetType is null; otherwise, TargetDataEventArgs<TData,TTarget> is created.
Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also