OPC Studio User's Guide and Reference
IsValidEventSource Method



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.Instrumentation Namespace > LogEntryEventArgs Class : IsValidEventSource Method
The name of the event source.

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

Determines whether the given event source string is valid, i.e. not a null reference and not empty.
Syntax
'Declaration
 
<ContractAnnotationAttribute("null => false")>
<PureAttribute()>
Public Shared Function IsValidEventSource( _
   ByVal source As String _
) As Boolean
'Usage
 
Dim source As String
Dim value As Boolean
 
value = LogEntryEventArgs.IsValidEventSource(source)
[ContractAnnotation("null => false")]
[Pure()]
public static bool IsValidEventSource( 
   string source
)
[ContractAnnotation("null => false")]
[Pure()]
public:
static bool IsValidEventSource( 
   String^ source
) 

Parameters

source
The name of the event source.

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

Return Value

true iff the event source string is valid.
Remarks

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