Connectivity Software User's Guide and Reference
ParseInternalPublisherId Method



OpcLabs.EasyOpcUAPrimitives Assembly > OpcLabs.EasyOpc.UA.PubSub Namespace > UAPubSubUtilities Class : ParseInternalPublisherId Method
The string to parse, in the format "[TypeName]value" where TypeName is Byte, UInt16, UInt32, UInt64, String, or empty for null.

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

When true, the type name comparison is case-insensitive; when false, it is case-sensitive.
Parses a string representation of an OPC-UA publisher Id and returns the internal value.
Syntax
'Declaration
 
<JetBrains.Annotations.CanBeNullAttribute()>
Public Shared Function ParseInternalPublisherId( _
   ByVal input As String, _
   ByVal ignoreCase As Boolean _
) As Object
'Usage
 
Dim input As String
Dim ignoreCase As Boolean
Dim value As Object
 
value = UAPubSubUtilities.ParseInternalPublisherId(input, ignoreCase)
[JetBrains.Annotations.CanBeNull()]
public static object ParseInternalPublisherId( 
   string input,
   bool ignoreCase
)
[JetBrains.Annotations.CanBeNull()]
public:
static Object^ ParseInternalPublisherId( 
   String^ input,
   bool ignoreCase
) 

Parameters

input
The string to parse, in the format "[TypeName]value" where TypeName is Byte, UInt16, UInt32, UInt64, String, or empty for null.

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

ignoreCase
When true, the type name comparison is case-insensitive; when false, it is case-sensitive.

Return Value

Returns the parsed publisher Id as null, System.Byte, System.UInt16, System.UInt32, System.UInt64, or System.String. Returns null for empty type name.

This method can return null (Nothing in Visual Basic).

Exceptions
ExceptionDescription
Thrown when the parsed numeric value is zero, or when the parsed string value is empty, as these are invalid publisher Ids.
Thrown when the input format is invalid (missing brackets, invalid type name, or invalid value format).
Thrown when the numeric value is outside the valid range for the specified type.

A null reference (Nothing in Visual Basic) is passed to a method that does not accept it as a valid argument.

This is a usage error, i.e. it will never occur (the exception will not be thrown) in a correctly written program. Your code should not catch this exception.

Remarks

Valid type names are: Byte, UInt16, UInt32, UInt64, String, or empty string (for null publisher Id).

Zero numeric values and empty string values are considered invalid publisher Ids per OPC UA specification.

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