Export (0) Print
Expand All

RelationalSyncProvider.SyncProviderPosition Property

Sync Framework 2.0

Gets or sets a SyncProviderPosition enumeration value that represents whether a provider is associated with the local or remote database.

This property is not CLS-compliant.  

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

public SyncProviderPosition SyncProviderPosition { get; set; }
/** @property */
public SyncProviderPosition get_SyncProviderPosition ()

/** @property */
public void set_SyncProviderPosition (SyncProviderPosition value)

public function get SyncProviderPosition () : SyncProviderPosition

public function set SyncProviderPosition (value : SyncProviderPosition)

Property Value

A SyncProviderPosition enumeration value that represents whether a provider is associated with the local or remote database.

The following code example instantiates local and remote providers and calls the SetupSyncProvider method in a sample class that was created for this documentation. This method is used so that providers can be configured easily for multiple nodes. Several provider commands are specified within this method. For more information about these commands and to view this code in the context of a complete example, see How to: Configure and Execute Collaborative Synchronization (Non-SQL Server).

DbSyncProvider localProvider = new DbSyncProvider();
DbSyncProvider remoteProvider = new DbSyncProvider();

//Create a provider by using the SetupSyncProvider on the sample class.             
sampleSyncProvider.SetupSyncProvider(localProviderConnString, localProvider);
localProvider.SyncProviderPosition = SyncProviderPosition.Local;

sampleSyncProvider.SetupSyncProvider(remoteProviderConnString, remoteProvider);
remoteProvider.SyncProviderPosition = SyncProviderPosition.Remote;

Show:
© 2014 Microsoft