Sdílet prostřednictvím


SyncSessionContext Constructor

Initializes a new instance of the SyncSessionContext class by using the specified ID format schema and callback object.

Namespace: Microsoft.Synchronization
Assembly: Microsoft.Synchronization (in microsoft.synchronization.dll)

Syntax

'Declaration
Public Sub New ( _
    idFormats As SyncIdFormatGroup, _
    callbacks As SyncCallbacks _
)
'Usage
Dim idFormats As SyncIdFormatGroup
Dim callbacks As SyncCallbacks

Dim instance As New SyncSessionContext(idFormats, callbacks)
public SyncSessionContext (
    SyncIdFormatGroup idFormats,
    SyncCallbacks callbacks
)
public:
SyncSessionContext (
    SyncIdFormatGroup^ idFormats, 
    SyncCallbacks^ callbacks
)
public SyncSessionContext (
    SyncIdFormatGroup idFormats, 
    SyncCallbacks callbacks
)
public function SyncSessionContext (
    idFormats : SyncIdFormatGroup, 
    callbacks : SyncCallbacks
)

Parameters

  • idFormats
    The ID format schema of the provider.
  • callbacks
    An object that receives notification of events that occur during synchronization. Can be a null reference (Nothing in Visual Basic).

Remarks

A SyncSessionContext object is typically created by Sync Framework and passed to the provider in the BeginSession method. This constructor is useful when a proxy provider is communicating with a remote provider across a computer boundary, because it allows the remote provider to create a SyncSessionContext object. Be aware that when callbacks is not a null reference (Nothing in Visual Basic), notifications are sent from the remote provider to the application, which can degrade performance, so callbacks should only be used when necessary or when performance is not an issue. Also, in the callback methods, the position of the remote provider is reported as Unknown.

See Also

Reference

SyncSessionContext Class
SyncSessionContext Members
Microsoft.Synchronization Namespace