Έχουν δημοσιευτεί Παρασκευή, 4 Μαρτίου 2011 4:31 μμ από το μέλος Dimitris Papadimitriou

Synchronising two folders using Microsoft Sync Framework using less than 10 lines of code

I remember that long time ago I wrote my own synchronisation class in order to sync folders for the needs of a project I was working on. I'm sure many of you have done something similar. Like me, maybe some of you even enjoyed writing that code. But now Microsoft Sync Framework is here! And the job is sooooo easy! Take a look at the code:

var provider1 = new FileSyncProvider(@"C:\Temp\FolderA"); var provider2 = new FileSyncProvider(@"C:\Temp\FolderB"); provider1.DetectChanges(); provider2.DetectChanges(); var agent = new SyncOrchestrator {     LocalProvider = provider1,     RemoteProvider = provider2,     Direction = SyncDirectionOrder.DownloadAndUpload }; agent.Synchronize();

What is Microsoft Sync Framework?

From MSDN: A comprehensive synchronization platform that enables collaboration and offline access for applications, services, and devices with support for any data type, any data store, any transfer protocol, and any network topology.

Permalink | Leave a comment  »

Share


Ενημέρωση για Σχόλια

Αν θα θέλατε να λαμβάνετε ένα e-mail όταν γίνονται ανανεώσεις στο περιεχόμενο αυτής της δημοσίευσης, παρακαλούμε γίνετε συνδρομητής εδώ

Παραμείνετε ενήμεροι στα τελευταία σχόλια με την χρήση του αγαπημένου σας RSS Aggregator και συνδρομή στη Τροφοδοσία RSS με σχόλια

Σχόλια:

Χωρίς Σχόλια

Ποιά είναι η άποψή σας για την παραπάνω δημοσίευση;

(απαιτούμενο)
απαιτούμενο
προαιρετικό
απαιτούμενο
ÅéóÜãåôå ôïí êùäéêü:
CAPTCHA Image

About Dimitris Papadimitriou

Click here to view my resume