November 13, 2008

Changes in Microsoft Sync Framework

1: // Set options for the sync operation

2: FileSyncOptions options = FileSyncOptions.ExplicitDetectChanges | FileSyncOptions.RecycleDeletedFiles | FileSyncOptions.RecycleConflictLoserFiles;

1: SyncAgent agent = new SyncAgent();
2: agent.LocalProvider = sourceProvider;
3: agent.RemoteProvider = destinationProvider;
4: agent.Direction = SyncDirection.Upload; // Sync source to destination
5: Console .WriteLine( "Synchronizing changes to replica: " + destinationProvider.RootDirectoryPath);
6: agent.Synchronize();

Becomes

1: SyncOrchestrator agent = new SyncOrchestrator();
2: agent.LocalProvider = sourceProvider;
3: agent.RemoteProvider = destinationProvider;
4: agent.Direction = SyncDirectionOrder.Upload; // Sync source to destination
5: Console.WriteLine("Synchronizing changes to replica: " + destinationProvider.RootDirectoryPath);
6: agent.Synchronize();

No comments: