Add 方法 (String, TableCreationOption, SyncDirection, SyncGroup)
将具有指定表名、创建选项、同步方向和同步组的 SyncTable 对象添加到集合的末尾。
命名空间: Microsoft.Synchronization.Data
程序集: Microsoft.Synchronization.Data(在 Microsoft.Synchronization.Data.dll 中)
语法
声明
Public Function Add ( _
tableName As String, _
creationOption As TableCreationOption, _
direction As SyncDirection, _
syncGroup As SyncGroup _
) As SyncTable
用法
Dim instance As SyncTableCollection
Dim tableName As String
Dim creationOption As TableCreationOption
Dim direction As SyncDirection
Dim syncGroup As SyncGroup
Dim returnValue As SyncTable
returnValue = instance.Add(tableName, _
creationOption, direction, syncGroup)
public SyncTable Add(
string tableName,
TableCreationOption creationOption,
SyncDirection direction,
SyncGroup syncGroup
)
public:
SyncTable^ Add(
String^ tableName,
TableCreationOption creationOption,
SyncDirection direction,
SyncGroup^ syncGroup
)
member Add :
tableName:string *
creationOption:TableCreationOption *
direction:SyncDirection *
syncGroup:SyncGroup -> SyncTable
public function Add(
tableName : String,
creationOption : TableCreationOption,
direction : SyncDirection,
syncGroup : SyncGroup
) : SyncTable
参数
- tableName
类型:System. . :: . .String
要添加到 SyncTableCollection 中的 SyncTable 对象的名称。
- creationOption
类型:Microsoft.Synchronization.Data. . :: . .TableCreationOption
一个 TableCreationOption 枚举值,用于定义如何在客户端数据库中创建表的架构。
- direction
类型:Microsoft.Synchronization.Data. . :: . .SyncDirection
一个 SyncDirection 枚举值,用于定义按照客户端的角度所确定的同步方向。
- syncGroup
类型:Microsoft.Synchronization.Data. . :: . .SyncGroup
用来在应用变更时对变更进行分组的 SyncGroup 对象。
返回值
类型:Microsoft.Synchronization.Data. . :: . .SyncTable
指定表名的 SyncTable 对象。