Share via


SyncDataConverter.TryConvertDataRetrieverToProviderFormat Method

When overridden in a derived class, converts the data retriever from an external format to the associated provider’s data retriever format.

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

Syntax

'Declaration
Public Overridable Function TryConvertDataRetrieverToProviderFormat ( _
    dataRetrieverIn As Object, _
    itemChanges As IEnumerable(Of ItemChange), _
    <OutAttribute> ByRef dataRetrieverOut As Object _
) As Boolean
'Usage
Dim instance As SyncDataConverter
Dim dataRetrieverIn As Object
Dim itemChanges As IEnumerable(Of ItemChange)
Dim dataRetrieverOut As Object
Dim returnValue As Boolean

returnValue = instance.TryConvertDataRetrieverToProviderFormat(dataRetrieverIn, _
    itemChanges, dataRetrieverOut)
public virtual bool TryConvertDataRetrieverToProviderFormat(
    Object dataRetrieverIn,
    IEnumerable<ItemChange> itemChanges,
    out Object dataRetrieverOut
)
public:
virtual bool TryConvertDataRetrieverToProviderFormat(
    Object^ dataRetrieverIn, 
    IEnumerable<ItemChange^>^ itemChanges, 
    [OutAttribute] Object^% dataRetrieverOut
)
abstract TryConvertDataRetrieverToProviderFormat : 
        dataRetrieverIn:Object * 
        itemChanges:IEnumerable<ItemChange> * 
        dataRetrieverOut:Object byref -> bool 
override TryConvertDataRetrieverToProviderFormat : 
        dataRetrieverIn:Object * 
        itemChanges:IEnumerable<ItemChange> * 
        dataRetrieverOut:Object byref -> bool 
public function TryConvertDataRetrieverToProviderFormat(
    dataRetrieverIn : Object, 
    itemChanges : IEnumerable<ItemChange>, 
    dataRetrieverOut : Object
) : boolean

Parameters

  • dataRetrieverIn
    Type: System.Object
    An object that represents the data retriever to be converted.
  • dataRetrieverOut
    Type: System.Object%
    An object that represents the converted data retriever.cases

Return Value

Type: System.Boolean
true if the data retriever conversion succeeded. Otherwise, false.

Remarks

This method is required only if one or both of the providers in a synchronization session retrieves data using an interface other than IChangeDataRetriever. Typically , the most efficient way to convert a data retriever is to create a proxy that implements the provider's data retriever interface and holds a pointer to the external data retriever interface. The proxy can then retrieve data from the external interface as changes are processed during the synchronization session. In some situations, such as remote change application scenarios, you must retrieve all of the changes first, convert them as necessary, and then serialize the data retriever with all the data in it. For these situations, use itemChanges to enumerate all of the changes that should be serialized.

For more information about data conversion, see Converting Data Between Providers.

See Also

Reference

SyncDataConverter Class

Microsoft.Synchronization Namespace