RelationalSyncProvider.SyncProviderPosition Property
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)
Syntax
'Declaration
Public Property SyncProviderPosition As SyncProviderPosition
'Usage
Dim instance As RelationalSyncProvider
Dim value As SyncProviderPosition
value = instance.SyncProviderPosition
instance.SyncProviderPosition = value
public SyncProviderPosition SyncProviderPosition { get; set; }
public:
property SyncProviderPosition SyncProviderPosition {
SyncProviderPosition get ();
void set (SyncProviderPosition value);
}
/** @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.
Example
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;
Dim localProvider As New DbSyncProvider()
Dim remoteProvider As 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
See Also
Reference
RelationalSyncProvider Class
RelationalSyncProvider Members
Microsoft.Synchronization.Data Namespace