QuickOPC User's Guide and Reference
SharedInstance Property (EasyUAClientConfiguration)



OpcLabs.EasyOpcUA Assembly > OpcLabs.EasyOpc.UA Namespace > EasyUAClientConfiguration Class : SharedInstance Property
A shared instance of the client object.
Syntax
'Declaration
 
Public Property SharedInstance As EasyUAClient
'Usage
 
Dim instance As EasyUAClientConfiguration
Dim value As EasyUAClient
 
instance.SharedInstance = value
 
value = instance.SharedInstance
public EasyUAClient SharedInstance {get; set;}
public:
property EasyUAClient^ SharedInstance {
   EasyUAClient^ get();
   void set (    EasyUAClient^ value);
}
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.

Requirements

Target Platforms: .NET Framework: Windows 10, Windows Server 2012; .NET Core: Linux, macOS, Microsoft Windows

See Also

Reference

EasyUAClientConfiguration Class
EasyUAClientConfiguration Members