'Declaration
<CanBeNullAttribute()> <ContractAnnotationAttribute("null => null; notnull => notnull")> Overloads Public Operator Narrowing CType( _ ByVal nodeDescriptor As UANodeDescriptor _ ) As UANodeId
'Usage
[CanBeNull()] [ContractAnnotation("null => null; notnull => notnull")] public UANodeId operator explicit( UANodeDescriptor nodeDescriptor )
[CanBeNull()] [ContractAnnotation("null => null; notnull => notnull")] public: UANodeId^ operator explicit( UANodeDescriptor^ nodeDescriptor )
Parameters
- nodeDescriptor
- Node descriptor.
Because the OpcLabs.EasyOpc.UA.UANodeDescriptor has implicit conversions from UANodeId, UANodeElement, OpcLabs.EasyOpc.UA.Navigation.UABrowsePath and System.String, in languages that support implicit conversion operators (such as C# or VB.NET), you can simply use a UANodeId object (representing the Id of the OPC UA node), a node element object (from OPC UA browsing), OpcLabs.EasyOpc.UA.Navigation.UABrowsePath object (representing OPC UA absolute browse path), or a string (with expanded node Id text) in place of this parameter, and the corresponding node descriptor will be constructed automatically. When the implicit conversion operators are not supported (such as with Python.NET), you can use the FromString, FromUABrowsePath, FromUANodeElement or FromUANodeId static method instead.
If you are using OPC Wizard (for server development), an implicit conversion from OpcLabs.EasyOpc.UA.NodeSpace.UAServerNode can be used in the same way to simply pass the server node in place of this parameter, which will use its OpcLabs.EasyOpc.UA.NodeSpace.UAServerNode.EffectiveNodeDescriptor property for the operation.
The value of this parameter can be
null
(Nothing
in Visual Basic).
Return Value
Because there is an implicit conversion from UANodeId to OpcLabs.EasyOpc.UA.UANodeDescriptor, in languages that support implicit conversion operators (such as C# or VB.NET), you can simply use the returned UANodeId in any place where the OpcLabs.EasyOpc.UA.UANodeDescriptor is expected as input, and the corresponding node descriptor will be constructed automatically.
Also, because the UANodeId has an implicit conversion to System.String, and it converts to the expanded text of the node Id (ExpandedText), in languages that support implicit conversion operators (such as C# or VB.NET), you can simply use the returned UANodeId in any place where expanded text of a node Id (a string) is expected as input, and the corresponding expanded text will be taken automatically from the node Id.
This method can return null
(Nothing
in Visual Basic).