SyncOperationStatistics Class

Represents statistics about a bidirectional synchronization session.

Namespace: Microsoft.Synchronization
Assembly: Microsoft.Synchronization (in microsoft.synchronization.dll)

public class SyncOperationStatistics
/** @attribute SerializableAttribute() */ 
public class SyncOperationStatistics
public class SyncOperationStatistics

The following example synchronizes data between two providers and displays the synchronization statistics to the user.

    // Create the synchronization orchestrator and set the providers and synchronization direction.
    SyncOrchestrator orchestrator = new SyncOrchestrator();
    orchestrator.LocalProvider = localProvider;
    orchestrator.RemoteProvider = remoteProvider;
    orchestrator.Direction = syncDir;

    string msg;
        // Synchronize data between the two providers.
        SyncOperationStatistics stats = orchestrator.Synchronize();

        // Display statistics for the synchronization operation.
        msg = "Synchronization succeeded!\n\n" +
            stats.DownloadChangesApplied + " download changes applied\n" +
            stats.DownloadChangesFailed + " download changes failed\n" +
            stats.UploadChangesApplied + " upload changes applied\n" +
            stats.UploadChangesFailed + " upload changes failed";
    catch (Exception ex)
        msg = "Synchronization failed! Here's why: \n\n" + ex.Message;
    MessageBox.Show(msg, "Synchronization Results");


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.