OPC Studio User's Guide and Reference
SharedInstance Property (_EasyUASubscriberManagement)



OpcLabs.EasyOpcUA Assembly > OpcLabs.EasyOpc.UA.PubSub.ComTypes Namespace > _EasyUASubscriberManagement Interface : SharedInstance Property
A shared instance of the subscriber object.
Syntax
'Declaration
 
<NotNullAttribute()>
ReadOnly Property SharedInstance As _EasyUASubscriber
'Usage
 
Dim instance As _EasyUASubscriberManagement
Dim value As _EasyUASubscriber
 
value = instance.SharedInstance
[NotNull()]
_EasyUASubscriber SharedInstance {get;}
[NotNull()]
property _EasyUASubscriber^ SharedInstance {
   _EasyUASubscriber^ get();
}

Property Value

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

Remarks

Use this property with care, as its usability is limited. Its main use is for testing, and for non-library application code where just a single instance is sufficient.

The shared instance is not suitable for Windows Forms or similar environments, where a specific System.Threading.SynchronizationContext may be used with each form.

We also do not recommend using the shared instance for library code, due to conflicts that may arise if your library sets some instance parameters which may not be the same as what other libraries or the final application expects.

This member or type is for use from COM. It is not meant to be used from .NET or Python. Refer to the corresponding .NET member or type instead, if you are developing in .NET or Python.

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