Connectivity Software User's Guide and Reference
Create Method (UAAttributeDataResult)



OpcLabs.EasyOpcUAPrimitives Assembly > OpcLabs.EasyOpc.UA.OperationModel Namespace > UAAttributeDataResult Class : Create Method
The exception representing a failure, or null for success.

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

The attribute data representing a successful result.

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

An optional state object associated with the operation.

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

Creates a new instance of the UAAttributeDataResult from either an exception or attribute data.
Syntax
'Declaration
 
<JetBrains.Annotations.NotNullAttribute()>
Public Shared Function Create( _
   ByVal exception As Exception, _
   ByVal attributeData As UAAttributeData, _
   Optional ByVal state As Object _
) As UAAttributeDataResult
'Usage
 
Dim exception As Exception
Dim attributeData As UAAttributeData
Dim state As Object
Dim value As UAAttributeDataResult
 
value = UAAttributeDataResult.Create(exception, attributeData, state)
[JetBrains.Annotations.NotNull()]
public static UAAttributeDataResult Create( 
   Exception exception,
   UAAttributeData attributeData,
   object state
)
[JetBrains.Annotations.NotNull()]
public:
static UAAttributeDataResult^ Create( 
   Exception^ exception,
   UAAttributeData^ attributeData,
   Object^ state
) 

Parameters

exception
The exception representing a failure, or null for success.

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

attributeData
The attribute data representing a successful result.

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

state
An optional state object associated with the operation.

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

Return Value

A new UAAttributeDataResult instance representing either success or failure.

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

Remarks

If exception is not null, a failed result is created. Otherwise, a successful result with the specified attributeData is created.

This method or property does not throw any exceptions, aside from execution exceptions such as System.Threading.ThreadAbortException or System.OutOfMemoryException.

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