ServerSyncProviderProxy Class
Provides a wrapper for the ServerSyncProvider.
Inheritance Hierarchy
System.Object
Microsoft.Synchronization.SyncProvider
Microsoft.Synchronization.Data.ServerSyncProvider
Microsoft.Synchronization.Data.ServerSyncProviderProxy
Namespace: Microsoft.Synchronization.Data
Assembly: Microsoft.Synchronization.Data (in Microsoft.Synchronization.Data.dll)
Syntax
'Declaration
Public Class ServerSyncProviderProxy _
Inherits ServerSyncProvider _
Implements IDisposable
'Usage
Dim instance As ServerSyncProviderProxy
public class ServerSyncProviderProxy : ServerSyncProvider,
IDisposable
public ref class ServerSyncProviderProxy : public ServerSyncProvider,
IDisposable
type ServerSyncProviderProxy =
class
inherit ServerSyncProvider
interface IDisposable
end
public class ServerSyncProviderProxy extends ServerSyncProvider implements IDisposable
The ServerSyncProviderProxy type exposes the following members.
Constructors
Name | Description | |
---|---|---|
ServerSyncProviderProxy | Initializes a new instance of the ServerSyncProviderProxy class by using a service proxy parameter. |
Top
Methods
Name | Description | |
---|---|---|
ApplyChanges | Applies inserts, updates, and deletes for a synchronization group to the server database. (Overrides ServerSyncProvider.ApplyChanges(SyncGroupMetadata, DataSet, SyncSession).) | |
Dispose | Releases all resources that are used by the ServerSyncProviderProxy. (Overrides ServerSyncProvider.Dispose().) | |
Equals | (Inherited from Object.) | |
Finalize | (Inherited from Object.) | |
GetChanges | Selects for a table in the server database the inserts, updates, and deletes to apply to the client database for a synchronization group. (Overrides ServerSyncProvider.GetChanges(SyncGroupMetadata, SyncSession).) | |
GetHashCode | (Inherited from Object.) | |
GetSchema | Gets the table schema from the server database. (Overrides ServerSyncProvider.GetSchema(Collection<String>, SyncSession).) | |
GetServerInfo | Gets server synchronization information. (Overrides ServerSyncProvider.GetServerInfo(SyncSession).) | |
GetType | (Inherited from Object.) | |
MemberwiseClone | (Inherited from Object.) | |
ToString | (Inherited from Object.) |
Top
Remarks
The ServerSyncProviderProxy class is used in N-tier scenarios: The proxy class is used on the client, and the server synchronization provider class is used on the server or on a middle-tier. The proxy communicates with a service on the server or middle-tier, and the service in turn communicates with the server synchronization provider.
Examples
The following code example is from a class that derives from SyncAgent. For two-tier synchronization, the client provider and server provider are both referenced directly in the synchronization agent as local and remote providers.
this.LocalProvider = new SampleClientSyncProvider();
this.RemoteProvider = new SampleServerSyncProvider();
Me.LocalProvider = New SampleClientSyncProvider()
Me.RemoteProvider = New SampleServerSyncProvider()
The following code example references the client provider directly, as in the two-tier example. However, the remote provider now references a proxy instead of directly referencing the server provider. The proxy is created by passing a reference to a WCF service. For more information, see How to: Configure N-Tier Synchronization.
this.LocalProvider = new SampleClientSyncProvider();
ServiceReference.ServiceForSyncClient serviceProxy = new ServiceReference.ServiceForSyncClient();
this.RemoteProvider = new ServerSyncProviderProxy(serviceProxy);
Me.LocalProvider = New SampleClientSyncProvider()
Dim serviceProxy As New ServiceReference.ServiceForSyncClient()
Me.RemoteProvider = New ServerSyncProviderProxy(serviceProxy)
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.