NotifyingChangeApplier.ApplyChanges 方法 (ConflictResolutionPolicy, ChangeBatch, IChangeDataRetriever, 泛型 IEnumerable, 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
)
public void ApplyChanges (
ConflictResolutionPolicy resolutionPolicy,
ChangeBatch sourceChanges,
IChangeDataRetriever changeDataRetriever,
IEnumerable<ItemChange> destinationVersions,
SyncKnowledge destinationKnowledge,
ForgottenKnowledge destinationForgottenKnowledge,
INotifyingChangeApplierTarget changeApplierTarget,
SyncSessionContext syncSessionState,
SyncCallbacks syncCallback
)
public function ApplyChanges (
resolutionPolicy : ConflictResolutionPolicy,
sourceChanges : ChangeBatch,
changeDataRetriever : IChangeDataRetriever,
destinationVersions : IEnumerable<ItemChange>,
destinationKnowledge : SyncKnowledge,
destinationForgottenKnowledge : ForgottenKnowledge,
changeApplierTarget : INotifyingChangeApplierTarget,
syncSessionState : SyncSessionContext,
syncCallback : SyncCallbacks
)
参数
- resolutionPolicy
用于解决冲突的策略。
- sourceChanges
来自源提供程序的变更批。
- changeDataRetriever
可用于从源副本中检索项数据的对象。
- destinationVersions
一个包含存储在目标副本中的项的版本的变更批。这些项与 sourceChanges 中的项相对应。
- destinationKnowledge
目标副本的知识。
- destinationForgottenKnowledge
目标副本的遗忘知识。
- changeApplierTarget
将被调用以用于保存变更和冲突的对象。
- syncSessionState
有关当前会话的状态信息。
- syncCallback
将接收有关变更应用事件的通知的回调。
备注
此方法检测在 sourceChanges 中发送的变更与目标副本中的对应项之间发生的冲突。该方法根据 resolutionPolicy 指定的策略解决所有冲突。如有必要,此方法随后会对 changeApplierTarget 调用方法,以将变更保存到目标副本中并保存未解决的冲突。
请参阅
参考
NotifyingChangeApplier 类
NotifyingChangeApplier 成员
Microsoft.Synchronization 命名空间