SyncAgent.RemoteProvider Property

Synchronization Services - ADO.NET 1.0 SP1

Gets or sets an object derived from ServerSyncProvider that is used to communicate with the remote data store.

Namespace: Microsoft.Synchronization
Assembly: Microsoft.Synchronization.Data (in

public SyncProvider RemoteProvider { get; set; }
/** @property */
public SyncProvider get_RemoteProvider ()

/** @property */
public void set_RemoteProvider (SyncProvider value)

public function get RemoteProvider () : SyncProvider

public function set RemoteProvider (value : SyncProvider)

Property Value

An object derived from ServerSyncProvider.

The following code example creates a class that derives from SyncAgent. The class instantiates a client synchronization provider and a server synchronization provider, creates a synchronization group, and adds the Customer table. When adding the table, synchronization direction and a table creation option are also specified. To view this code in the context of a complete example, see How to: Exchange Bidirectional Incremental Data Changes Between a Client and Server.

public class SampleSyncAgent : SyncAgent
    public SampleSyncAgent()
        //Instantiate a client synchronization provider and specify it
        //as the local provider for this synchronization agent.
        this.LocalProvider = new SampleClientSyncProvider();

        //Instantiate a server synchronization provider and specify it
        //as the remote provider for this synchronization agent.
        this.RemoteProvider = new SampleServerSyncProvider();

        //Create a Customer SyncGroup. This is not required
        //for the single table we are synchronizing; it is typically
        //used so that changes to multiple related tables are 
        //synchronized at the same time.
        SyncGroup customerSyncGroup = new SyncGroup("Customer");

        //Add the Customer table: specify a synchronization direction of
        //Bidirectional, and that an existing table should be dropped.
        SyncTable customerSyncTable = new SyncTable("Customer");
        customerSyncTable.CreationOption = TableCreationOption.DropExistingOrCreateNewTable;
        customerSyncTable.SyncDirection = SyncDirection.Bidirectional;
        customerSyncTable.SyncGroup = customerSyncGroup;