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



OpcLabs.EasyOpcUAPrimitives Assembly > OpcLabs.EasyOpc.UA.OperationModel Namespace > UANodeElementCollectionResult 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 collection of node elements representing a successful result.

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

The individual elements of the parameter value cannot 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 UANodeElementCollectionResult from either an exception or a node element collection.
Syntax
'Declaration
 
<JetBrains.Annotations.NotNullAttribute()>
Public Shared Function Create( _
   ByVal exception As Exception, _
   ByVal nodeElementCollection As UANodeElementCollection, _
   Optional ByVal state As Object _
) As UANodeElementCollectionResult
'Usage
 
Dim exception As Exception
Dim nodeElementCollection As UANodeElementCollection
Dim state As Object
Dim value As UANodeElementCollectionResult
 
value = UANodeElementCollectionResult.Create(exception, nodeElementCollection, state)
[JetBrains.Annotations.NotNull()]
public static UANodeElementCollectionResult Create( 
   Exception exception,
   UANodeElementCollection nodeElementCollection,
   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).

nodeElementCollection
The collection of node elements representing a successful result.

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

The individual elements of the parameter value cannot 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 UANodeElementCollectionResult 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 nodeElementCollection 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