OPC Studio User's Guide and Reference
GetDataType<TDataType> Method (IUADataTypeSystemExtension)



OpcLabs.EasyOpcUA Assembly > OpcLabs.EasyOpc.UA.DataTypeModel.Extensions Namespace > IUADataTypeSystemExtension Class : GetDataType<TDataType> Method
The data type class to be returned.
The data type system that will perform the operation.

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

Data type info.

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

Gets the data type of specified data type class for the specified data type info.
Syntax
'Declaration
 
<ExtensionAttribute()>
<NotNullAttribute()>
Public Shared Function GetDataType(Of TDataType As DataType)( _
   ByVal dataTypeSystem As IUADataTypeSystem, _
   ByVal dataTypeInfo As UADataTypeInfo _
) As ValueResult(Of TDataType)
'Usage
 
Dim dataTypeSystem As IUADataTypeSystem
Dim dataTypeInfo As UADataTypeInfo
Dim value As ValueResult(Of TDataType)
 
value = IUADataTypeSystemExtension.GetDataType(Of TDataType)(dataTypeSystem, dataTypeInfo)
[Extension()]
[NotNull()]
public static ValueResult<TDataType> GetDataType<TDataType>( 
   IUADataTypeSystem dataTypeSystem,
   UADataTypeInfo dataTypeInfo
)
where TDataType: DataType
[Extension()]
[NotNull()]
public:
static ValueResult<TDataType^>^ GetDataTypegeneric<typename TDataType>
( 
   IUADataTypeSystem^ dataTypeSystem,
   UADataTypeInfo^ dataTypeInfo
) 
where TDataType: DataType

Parameters

dataTypeSystem
The data type system that will perform the operation.

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

dataTypeInfo
Data type info.

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

Type Parameters

TDataType
The data type class to be returned.

Return Value

A value result: A success with the data type for the specified data type info, or a failure.

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

Remarks

This is an extension method (info: C#, VB.NET). In languages that have support for extensions methods (such as C# and VB.NET), you can use the extension method as if it were a regular method on the object that is its first parameter. In other languages (such as with Python.NET), you will call the extension as a static method, and pass it the object on which it acts as its first parameter.

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