TcAdsClient.Synchronize Property
Gets or sets a value indicating whether the TcAdsClient object synchronizes the incoming notifications (obsolete)
Namespace: TwinCAT.Ads
Assembly: TwinCAT.Ads (in TwinCAT.Ads.dll)
Version: 4.3.0.0
Syntax
C#
public bool Synchronize { get; set; }
VB
Public Property Synchronize As Boolean
Get
Set
Property Value
Type: Boolean
Remarks
IMPORTANT: Be aware that this setting could be removed in later version of this API. The default setting changed from 'true' to 'false' in newer versions, because synchronization should be done in the Application and not has helper functionality within this class / API. Please think about of using .NET SynchronizationContexts or Control.Invoke(...) calls for Application side synchronization. If Synchronize is set to true, the notifications are synchronized onto the Main thread. This is helpful for Windows Forms projects because this automatically synchronizes the notifications into the main UI thread and prevents any synchronization issues like deadlocks. In Console Applications it is necessary to set this flag to false if ADS notifications are used, because the Console Host doesn't trigger any message pumps, effectively blocking any Windows Messages and ADS Notifications.