Connectivity Software User's Guide and Reference
IsValidInternalValue(Object,Boolean) Method



OpcLabs.EasyOpcUAPrimitives Assembly > OpcLabs.EasyOpc.UA.PubSub Namespace > UAPublisherId Class > IsValidInternalValue Method : IsValidInternalValue(Object,Boolean) Method
The value to be tested.

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

If true, zero numeric values and empty strings are considered valid (treated as null); if false, strict validation is applied.
Determines whether an object represents a valid internal value of a publisher Id, with optional relaxed validation.
Syntax
'Declaration
 
<JetBrains.Annotations.MustUseReturnValueAttribute()>
<JetBrains.Annotations.PureAttribute()>
Public Overloads Shared Function IsValidInternalValue( _
   ByVal value As Object, _
   ByVal relaxed As Boolean _
) As Boolean
'Usage
 
Dim value As Object
Dim relaxed As Boolean
Dim value As Boolean
 
value = UAPublisherId.IsValidInternalValue(value, relaxed)
[JetBrains.Annotations.MustUseReturnValue()]
[JetBrains.Annotations.Pure()]
public static bool IsValidInternalValue( 
   object value,
   bool relaxed
)
[JetBrains.Annotations.MustUseReturnValue()]
[JetBrains.Annotations.Pure()]
public:
static bool IsValidInternalValue( 
   Object^ value,
   bool relaxed
) 

Parameters

value
The value to be tested.

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

relaxed
If true, zero numeric values and empty strings are considered valid (treated as null); if false, strict validation is applied.

Return Value

Returns true if the value represents a valid internal value of a publisher Id; returns false otherwise.

This return value of this method should not be ignored.

Remarks

Internal value is used in the OPC-UA PubSub specification, not CLS-compliant. It is System.Byte, System.UInt16, System.UInt32, System.UInt64, System.String, or null.

The following internal values are valid:

When relaxed is false (strict validation), zero numeric values and empty strings are invalid. When relaxed is true, zero numeric values and empty strings are treated as equivalent to null and are considered valid.

This method is pure, i.e. it does not have observable side effects.

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