SaveChangeWithChangeUnitsContext.GetUpdatedDestinationKnowledge Method
Gets updated knowledge and forgotten knowledge objects that represent the state of the destination knowledge after this change unit change is applied.
Namespace: Microsoft.Synchronization
Assembly: Microsoft.Synchronization (in Microsoft.Synchronization.dll)
Syntax
'Declaration
Public Sub GetUpdatedDestinationKnowledge ( _
<OutAttribute> ByRef knowledge As SyncKnowledge, _
<OutAttribute> ByRef forgottenKnowledge As ForgottenKnowledge _
)
'Usage
Dim instance As SaveChangeWithChangeUnitsContext
Dim knowledge As SyncKnowledge
Dim forgottenKnowledge As ForgottenKnowledge
instance.GetUpdatedDestinationKnowledge(knowledge, _
forgottenKnowledge)
public void GetUpdatedDestinationKnowledge(
out SyncKnowledge knowledge,
out ForgottenKnowledge forgottenKnowledge
)
public:
void GetUpdatedDestinationKnowledge(
[OutAttribute] SyncKnowledge^% knowledge,
[OutAttribute] ForgottenKnowledge^% forgottenKnowledge
)
member GetUpdatedDestinationKnowledge :
knowledge:SyncKnowledge byref *
forgottenKnowledge:ForgottenKnowledge byref -> unit
public function GetUpdatedDestinationKnowledge(
knowledge : SyncKnowledge,
forgottenKnowledge : ForgottenKnowledge
)
Parameters
- knowledge
Type: Microsoft.Synchronization.SyncKnowledge%
Returns the updated knowledge for the destination.
- forgottenKnowledge
Type: Microsoft.Synchronization.ForgottenKnowledge%
Returns the updated forgotten knowledge for the destination.
Remarks
The knowledge objects that are returned by this method should directly replace the existing knowledge objects on the destination.
Before calling this method, any recoverable errors must be reported with RecordRecoverableErrorForChangeUnit.
Calling this method more than one time returns InvalidOperationException on any call but the first.
Examples
The following example gets the updated knowledge and forgotten knowledge and stores the updated knowledge in the metadata store of the destination replica. This example does not allow deletion of tombstones, so forgotten knowledge is not stored.
Dim updatedKnowledge As SyncKnowledge = Nothing
Dim updatedForgottenKnowledge As ForgottenKnowledge = Nothing
context.GetUpdatedDestinationKnowledge(updatedKnowledge, updatedForgottenKnowledge)
SyncKnowledge updatedKnowledge;
ForgottenKnowledge updatedForgottenKnowledge;
context.GetUpdatedDestinationKnowledge(out updatedKnowledge, out updatedForgottenKnowledge);
_ContactStore.ContactReplicaMetadata.SetKnowledge(updatedKnowledge);