SqlCeSyncDescriptionBuilder Class
Represents scope and table information for a SQL Server Compact database that is involved in synchronization.
Namespace: Microsoft.Synchronization.Data.SqlServerCe
Assembly: Microsoft.Synchronization.Data.SqlServerCe (in microsoft.synchronization.data.sqlserverce.dll)
Syntax
'Declaration
Public NotInheritable Class SqlCeSyncDescriptionBuilder
'Usage
The members of a static class are accessed directly without an instance of the class.
public static class SqlCeSyncDescriptionBuilder
public ref class SqlCeSyncDescriptionBuilder abstract sealed
public final class SqlCeSyncDescriptionBuilder
public final class SqlCeSyncDescriptionBuilder
Example
The following code example provisions a SQL Server database. Provisioning is based on scope information that is retrieved from a SQL Server Compact database by calling GetDescriptionForScope and specifying the scope name ("filtered_customer"
), the optional object prefix name used in the SQL Server Compact database (in this case "Sync"
), and the connection. SQL Server Compact databases do not support separate schemas, so we prefix the name of all synchronization-related objects with "Sync"
so that they are easy to identify. For the SQL Server database, we specify the optional database schema in which Sync Framework stores synchronization objects (in this case "Sync"
, but the value is not required to match the object prefix). To view this code in the context of a complete example, see How to: Configure and Execute Collaborative Synchronization (SQL Server).
DbSyncScopeDescription clientSqlDesc = SqlCeSyncDescriptionBuilder.GetDescriptionForScope("filtered_customer", "Sync", clientSqlCe1Conn);
SqlSyncScopeProvisioning clientSqlConfig = new SqlSyncScopeProvisioning(clientSqlDesc);
clientSqlConfig.ObjectSchema = "Sync";
clientSqlConfig.Apply(clientSqlConn);
Dim clientSqlDesc As DbSyncScopeDescription = _
SqlCeSyncDescriptionBuilder.GetDescriptionForScope("filtered_customer", "Sync", clientSqlCe1Conn)
Dim clientSqlConfig As New SqlSyncScopeProvisioning(clientSqlDesc)
clientSqlConfig.ObjectSchema = "Sync"
clientSqlConfig.Apply(clientSqlConn)
Inheritance Hierarchy
System.Object
Microsoft.Synchronization.Data.SqlServerCe.SqlCeSyncDescriptionBuilder
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.
See Also
Reference
SqlCeSyncDescriptionBuilder Members
Microsoft.Synchronization.Data.SqlServerCe Namespace