다음을 통해 공유


SyncGroup.GroupName 속성

SyncGroup의 이름을 가져오거나 설정합니다.

네임스페이스: Microsoft.Synchronization.Data
어셈블리: microsoft.synchronization.data.dll의 Microsoft.Synchronization.Data

구문

‘선언
Public Property GroupName As String
‘사용 방법
Dim instance As SyncGroup
Dim value As String

value = instance.GroupName

instance.GroupName = value
public string GroupName { get; set; }
public:
property String^ GroupName {
    String^ get ();
    void set (String^ value);
}
/** @property */
public String get_GroupName ()

/** @property */
public void set_GroupName (String value)
public function get GroupName () : String

public function set GroupName (value : String)

속성 값

SyncGroup의 이름입니다.

예제

다음 코드 예제는 SyncAgent에서 파생된 클래스에서 제공된 것입니다. 이 코드에서는 두 가지 동기화 그룹과 세 가지 동기화 테이블을 만듭니다. Customer 테이블은 Customer 그룹에 추가되고 OrderHeaderOrderDetail 테이블은 Order 그룹에 추가됩니다. 모든 테이블은 다운로드 전용입니다. 테이블이 클라이언트에 있으면 초기 동기화 중에 테이블이 삭제되고 다시 만들어집니다. 전체 예제의 맥락에서 이 코드를 보려면 방법: 행 및 열 필터링을 참조하십시오.

//Create two SyncGroups so that changes to OrderHeader
//and OrderDetail are made in one transaction. Depending on
//application requirements, you might include Customer
//in the same group.
SyncGroup customerSyncGroup = new SyncGroup("Customer");
SyncGroup orderSyncGroup = new SyncGroup("Order");

//Add each table: specify a synchronization direction of
//DownloadOnly.
SyncTable customerSyncTable = new SyncTable("Customer");
customerSyncTable.CreationOption = TableCreationOption.DropExistingOrCreateNewTable;
customerSyncTable.SyncDirection = SyncDirection.DownloadOnly;
customerSyncTable.SyncGroup = customerSyncGroup;
this.Configuration.SyncTables.Add(customerSyncTable);

SyncTable orderHeaderSyncTable = new SyncTable("OrderHeader");
orderHeaderSyncTable.CreationOption = TableCreationOption.DropExistingOrCreateNewTable;
orderHeaderSyncTable.SyncDirection = SyncDirection.DownloadOnly;
orderHeaderSyncTable.SyncGroup = orderSyncGroup;
this.Configuration.SyncTables.Add(orderHeaderSyncTable);           

SyncTable orderDetailSyncTable = new SyncTable("OrderDetail");
orderDetailSyncTable.CreationOption = TableCreationOption.DropExistingOrCreateNewTable;
orderDetailSyncTable.SyncDirection = SyncDirection.DownloadOnly;
orderDetailSyncTable.SyncGroup = orderSyncGroup;
this.Configuration.SyncTables.Add(orderDetailSyncTable);
'Create two SyncGroups so that changes to OrderHeader
'and OrderDetail are made in one transaction. Depending on
'application requirements, you might include Customer
'in the same group.
Dim customerSyncGroup As New SyncGroup("Customer")
Dim orderSyncGroup As New SyncGroup("Order")

'Add each table: specify a synchronization direction of
'DownloadOnly.
Dim customerSyncTable As New SyncTable("Customer")
customerSyncTable.CreationOption = TableCreationOption.DropExistingOrCreateNewTable
customerSyncTable.SyncDirection = SyncDirection.DownloadOnly
customerSyncTable.SyncGroup = customerSyncGroup
Me.Configuration.SyncTables.Add(customerSyncTable)

Dim orderHeaderSyncTable As New SyncTable("OrderHeader")
orderHeaderSyncTable.CreationOption = TableCreationOption.DropExistingOrCreateNewTable
orderHeaderSyncTable.SyncDirection = SyncDirection.DownloadOnly
orderHeaderSyncTable.SyncGroup = orderSyncGroup
Me.Configuration.SyncTables.Add(orderHeaderSyncTable)

Dim orderDetailSyncTable As New SyncTable("OrderDetail")
orderDetailSyncTable.CreationOption = TableCreationOption.DropExistingOrCreateNewTable
orderDetailSyncTable.SyncDirection = SyncDirection.DownloadOnly
orderDetailSyncTable.SyncGroup = orderSyncGroup
Me.Configuration.SyncTables.Add(orderDetailSyncTable)

참고 항목

참조

SyncGroup 클래스
SyncGroup 멤버
Microsoft.Synchronization.Data 네임스페이스