次の方法で共有


ApplyChanges メソッド (ConflictResolutionPolicy, ChangeBatch, IChangeDataRetriever, IEnumerable(ItemChange), SyncKnowledge, ForgottenKnowledge, INotifyingChangeApplierTarget, SyncSessionContext, SyncCallbacks)

変更バッチに対して競合検出、競合処理、および変更の適用を実行します。

名前空間:  Microsoft.Synchronization
アセンブリ:  Microsoft.Synchronization (Microsoft.Synchronization.dll 内)

構文

'宣言
Public Sub ApplyChanges ( _
    resolutionPolicy As ConflictResolutionPolicy, _
    sourceChanges As ChangeBatch, _
    changeDataRetriever As IChangeDataRetriever, _
    destinationVersions As IEnumerable(Of ItemChange), _
    destinationKnowledge As SyncKnowledge, _
    destinationForgottenKnowledge As ForgottenKnowledge, _
    changeApplierTarget As INotifyingChangeApplierTarget, _
    syncSessionState As SyncSessionContext, _
    syncCallback As SyncCallbacks _
)
'使用
Dim instance As NotifyingChangeApplier
Dim resolutionPolicy As ConflictResolutionPolicy
Dim sourceChanges As ChangeBatch
Dim changeDataRetriever As IChangeDataRetriever
Dim destinationVersions As IEnumerable(Of ItemChange)
Dim destinationKnowledge As SyncKnowledge
Dim destinationForgottenKnowledge As ForgottenKnowledge
Dim changeApplierTarget As INotifyingChangeApplierTarget
Dim syncSessionState As SyncSessionContext
Dim syncCallback As SyncCallbacks

instance.ApplyChanges(resolutionPolicy, _
    sourceChanges, changeDataRetriever, _
    destinationVersions, destinationKnowledge, _
    destinationForgottenKnowledge, _
    changeApplierTarget, syncSessionState, _
    syncCallback)
public void ApplyChanges(
    ConflictResolutionPolicy resolutionPolicy,
    ChangeBatch sourceChanges,
    IChangeDataRetriever changeDataRetriever,
    IEnumerable<ItemChange> destinationVersions,
    SyncKnowledge destinationKnowledge,
    ForgottenKnowledge destinationForgottenKnowledge,
    INotifyingChangeApplierTarget changeApplierTarget,
    SyncSessionContext syncSessionState,
    SyncCallbacks syncCallback
)
public:
void ApplyChanges(
    ConflictResolutionPolicy resolutionPolicy, 
    ChangeBatch^ sourceChanges, 
    IChangeDataRetriever^ changeDataRetriever, 
    IEnumerable<ItemChange^>^ destinationVersions, 
    SyncKnowledge^ destinationKnowledge, 
    ForgottenKnowledge^ destinationForgottenKnowledge, 
    INotifyingChangeApplierTarget^ changeApplierTarget, 
    SyncSessionContext^ syncSessionState, 
    SyncCallbacks^ syncCallback
)
member ApplyChanges : 
        resolutionPolicy:ConflictResolutionPolicy * 
        sourceChanges:ChangeBatch * 
        changeDataRetriever:IChangeDataRetriever * 
        destinationVersions:IEnumerable<ItemChange> * 
        destinationKnowledge:SyncKnowledge * 
        destinationForgottenKnowledge:ForgottenKnowledge * 
        changeApplierTarget:INotifyingChangeApplierTarget * 
        syncSessionState:SyncSessionContext * 
        syncCallback:SyncCallbacks -> unit 
public function ApplyChanges(
    resolutionPolicy : ConflictResolutionPolicy, 
    sourceChanges : ChangeBatch, 
    changeDataRetriever : IChangeDataRetriever, 
    destinationVersions : IEnumerable<ItemChange>, 
    destinationKnowledge : SyncKnowledge, 
    destinationForgottenKnowledge : ForgottenKnowledge, 
    changeApplierTarget : INotifyingChangeApplierTarget, 
    syncSessionState : SyncSessionContext, 
    syncCallback : SyncCallbacks
)

パラメーター

  • destinationVersions
    型 : System.Collections.Generic. . :: . .IEnumerable< (Of < ( <'ItemChange> ) > ) >
    同期先レプリカに格納されている項目のバージョンが含まれている変更バッチです。これらの項目は、sourceChanges の項目に対応しています。

例外

例外 条件
ArgumentNullException

sourceChanges、changeDataRetriever、destinationKnowledge、changeApplierTarget、または syncCallback が null Nothing nullptr unit NULL 参照 (Visual Basic では Nothing) です。

ArgumentOutOfRangeException

resolutionPolicy が ConflictResolutionPolicy 列挙体のメンバーではありません。

SyncIdFormatMismatchException
  • sourceChanges に、destinationKnowledge とは異なる形式の忘れられたナレッジがいくつかあります。

または

  • destinationForgottenKnowledge が指定されましたが、destinationKnowledge の形式と異なります。

説明

このメソッドは、sourceChanges で送信された変更と同期先レプリカ内の対応する項目の間で発生する競合を検出します。競合は、resolutionPolicy で指定されたポリシーに従って解決されます。必要に応じて、このメソッドは、changeApplierTarget のメソッドを呼び出し、同期先レプリカへの変更を保存し、未解決の競合を保存します。

参照

参照

NotifyingChangeApplierクラス

NotifyingChangeApplier メンバー

ApplyChanges オーバーロード

Microsoft.Synchronization 名前空間