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 type of the target object.
The data of the event.
The target object of the linking.
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.
targetType
The type of the target object.
data
The data of the event.
targetObject
The target object of the linking.

Return Value

The typed event data object with the specified content.
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