Metodo INotifyingChangeApplierTarget2.SaveConstraintConflict
Quando sottoposto a override in una classe derivata, salva le informazioni sugli elementi coinvolti in un conflitto di vincoli.
Spazio dei nomi: Microsoft.Synchronization
Assembly: Microsoft.Synchronization (in microsoft.synchronization.dll)
Sintassi
'Dichiarazione
Sub SaveConstraintConflict ( _
conflictingChange As ItemChange, _
conflictingItemId As SyncId, _
reason As ConstraintConflictReason, _
conflictingChangeData As Object, _
conflictingChangeKnowledge As SyncKnowledge, _
temporary As Boolean _
)
'Utilizzo
Dim instance As INotifyingChangeApplierTarget2
Dim conflictingChange As ItemChange
Dim conflictingItemId As SyncId
Dim reason As ConstraintConflictReason
Dim conflictingChangeData As Object
Dim conflictingChangeKnowledge As SyncKnowledge
Dim temporary As Boolean
instance.SaveConstraintConflict(conflictingChange, conflictingItemId, reason, conflictingChangeData, conflictingChangeKnowledge, temporary)
void SaveConstraintConflict (
ItemChange conflictingChange,
SyncId conflictingItemId,
ConstraintConflictReason reason,
Object conflictingChangeData,
SyncKnowledge conflictingChangeKnowledge,
bool temporary
)
void SaveConstraintConflict (
ItemChange^ conflictingChange,
SyncId^ conflictingItemId,
ConstraintConflictReason reason,
Object^ conflictingChangeData,
SyncKnowledge^ conflictingChangeKnowledge,
bool temporary
)
void SaveConstraintConflict (
ItemChange conflictingChange,
SyncId conflictingItemId,
ConstraintConflictReason reason,
Object conflictingChangeData,
SyncKnowledge conflictingChangeKnowledge,
boolean temporary
)
function SaveConstraintConflict (
conflictingChange : ItemChange,
conflictingItemId : SyncId,
reason : ConstraintConflictReason,
conflictingChangeData : Object,
conflictingChangeKnowledge : SyncKnowledge,
temporary : boolean
)
Parametri
- conflictingChange
Metadati dell'elemento per la modifica in conflitto rispetto al provider di origine.
- conflictingItemId
ID elemento dell'elemento nella replica di destinazione in conflitto con l'elemento specificato da conflictingChange.
- reason
Motivo per cui si è verificato il conflitto.
- conflictingChangeData
Dati dell'elemento per la modifica in conflitto.
- conflictingChangeKnowledge
Conoscenza da acquisire se viene applicata questa modifica. Deve essere salvata con la modifica.
- temporary
true se si tratta di un conflitto temporaneo. In caso contrario, false.
Osservazioni
Se la modifica rappresentata da questo conflitto viene applicata a una replica, è necessario combinare conflictingChangeKnowledge con la conoscenza di tale replica.
Esempio
Nell'esempio seguente viene mostrato come salvare un conflitto di vincoli temporaneo tramite un oggetto MemoryConflictLog.
public void SaveConstraintConflict(ItemChange conflictingChange, SyncId conflictingItemId,
ConstraintConflictReason reason, object conflictingChangeData, SyncKnowledge conflictingChangeKnowledge,
bool temporary)
{
if (!temporary)
{
// The in-memory conflict log is used, so if a non-temporary conflict is saved, it's
// an error.
throw new NotImplementedException("SaveConstraintConflict can only save temporary conflicts.");
}
else
{
// For temporary conflicts, just pass on the data and let the conflict log handle it.
_memConflictLog.SaveConstraintConflict(conflictingChange, conflictingItemId, reason,
conflictingChangeData, conflictingChangeKnowledge, temporary);
}
}
Vedere anche
Riferimento
Interfaccia INotifyingChangeApplierTarget2
Membri INotifyingChangeApplierTarget2
Spazio dei nomi Microsoft.Synchronization