Hi!
SyncAgent is missing the SyncDirection Property why?
Also I am getting the following error compile time error "Cannot implicitly convert type 'Microsoft.Synchronization.Files.FileSyncProvider' to 'Microsoft.Synchronization.SyncProvider' when executing the line SyncAgent agent = new SyncAgent();
Code Snippet
FileSyncProvider
sourceProvider = null;
FileSyncProvider destinationProvider = null;
try
{
sourceProvider =
new FileSyncProvider(sourceReplicaId.GetGuidId(), sourceReplicaRootPath, filter, options);
destinationProvider =
new FileSyncProvider(destinationReplicaId.GetGuidId(), destinationReplicaRootPath, filter, options);
destinationProvider.AppliedChange +=
new EventHandler<AppliedChangeEventArgs>(OnAppliedChange);
destinationProvider.SkippedChange +=
new EventHandler<SkippedChangeEventArgs>(OnSkippedChange);
SyncAgent agent = new SyncAgent();
agent.LocalProvider = sourceProvider;
agent.RemoteProvider = destinationProvider;
//agent. = SyncDirection.; // Sync source to destination
Console.WriteLine("Synchronizing changes to replica: " + destinationProvider.RootDirectoryPath);
agent.Synchronize();
}
Any ideas?