locked
Data Converters swapped? RRS feed

  • Question

  • Hi,

    I'm using the Sync Framework 2.0 (managed) for a while now, but I've just started using SyncDataConverters.

    I have discovered that the framework seems to call the converters just the opposite as they are defined: Normally, I would expect the *local* converter (i.e. SyncOrchestrator.LocalDataConverter) to be asked for converting data to and from the *local* provider's (SyncOrchestrator.LocalProvider) format. However, said local converter is called with objects in the remote provider's format.

    If I exchange the local and remove converters, i.e. "SyncOrchestrator.LocalDataConverter = myRemoteProvidersConverter" etc., it works correctly.

    In my SyncDataConverter, I am overriding only ConvertDataFromProviderFormat and ConvertDataToProviderFormat. I also only tested with providers derived from FullEnumerationSimpleSyncProvider. I have verified several times that I did not mix types on my side, but I'm pretty certain now that I'm not. Maybe the framework is mixing both converters at some point? Is could also affect the managed wrapper only, I did not test in native code.

    While the current workaround works perfectly, this is something that should be addressed or documented.

    Best regards,

    Michael

    Tuesday, June 22, 2010 8:41 PM