ApplyChanges-Methode (ConflictResolutionPolicy, ChangeBatch, IChangeDataRetriever, IEnumerable(ItemChange), SyncKnowledge, ForgottenKnowledge, INotifyingChangeApplierTarget, SyncSessionContext, SyncCallbacks)

Führt Konflikterkennung, Konfliktbehandlung und Änderungsanwendung für einen Batch von Änderungen aus.

Namespace:  Microsoft.Synchronization
Assembly:  Microsoft.Synchronization (in Microsoft.Synchronization.dll)

Syntax

'Declaration
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 _
)
'Usage
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
)

Parameter

Ausnahmen

Ausnahme Bedingung
ArgumentNullException

sourceChanges, changeDataRetriever, destinationKnowledge, changeApplierTarget oder syncCallback ist NULL.

ArgumentOutOfRangeException

resolutionPolicy ist kein Member der ConflictResolutionPolicy-Enumeration.

SyncIdFormatMismatchException
  • sourceChanges enthält vergessenes Wissen, as in einem anderen Format vorliegt als destinationKnowledge

- oder -

  • destinationForgottenKnowledge wurde angegeben und weist ein anderes Format auf als destinationKnowledge

Hinweise

Diese Methode erkennt Konflikte, die zwischen den in sourceChanges gesendeten Änderungen und den entsprechenden Elementen im Zielreplikat auftreten. Sie löst alle Konflikte gemäß der von resolutionPolicy angegebenen Richtlinie auf. Falls erforderlich, ruft diese Methode anschließend Methoden für changeApplierTarget auf, um Änderungen im Zielreplikat sowie nicht aufgelöste Konflikte zu speichern.

Siehe auch

Verweis

NotifyingChangeApplier Klasse

NotifyingChangeApplier-Member

ApplyChanges-Überladung

Microsoft.Synchronization-Namespace