public void Synchronization(int localPeerID, int remotePeerID) { try { localSyncProvider = SyncProviderHelper.CreateSyncProvider(localPeerID); localSyncProvider.SyncProviderPosition = SyncProviderPosition.Local; remoteSyncProvider = SyncProviderHelper.CreateSyncProvider(remotePeerID); remoteSyncProvider.SyncProviderPosition = SyncProviderPosition.Remote; collaborationSyncAgent = new SyncOrchestrator(); collaborationSyncAgent.LocalProvider = localSyncProvider; collaborationSyncAgent.RemoteProvider = remoteSyncProvider; collaborationSyncAgent.Direction = SyncDirectionOrder.UploadAndDownload; syncStatistics = collaborationSyncAgent.Synchronize(); } catch (Exception exc) { Console.WriteLine(exc.ToString()); } }
private DbSyncProvider remoteSyncProvider = null; public void BeginSession() { remoteSyncProvider = SyncProviderHelper.CreateSyncProvider(2); }