SyncAgent.SyncStatistics Property

Gets a SyncStatistics object that represents statistics for a synchronization session.

Namespace:  Microsoft.Synchronization
Assembly:  Microsoft.Synchronization.Data (in Microsoft.Synchronization.Data.dll)

Syntax

'Declaration
Public ReadOnly Property SyncStatistics As SyncStatistics
    Get
'Usage
Dim instance As SyncAgent
Dim value As SyncStatistics

value = instance.SyncStatistics
public SyncStatistics SyncStatistics { get; }
public:
property SyncStatistics^ SyncStatistics {
    SyncStatistics^ get ();
}
member SyncStatistics : SyncStatistics
function get SyncStatistics () : SyncStatistics

Property Value

Type: Microsoft.Synchronization.Data.SyncStatistics
A SyncStatistics object that represents statistics for a synchronization session.

Remarks

Synchronization statistics are useful for logging and for presenting summary data to a user after a synchronization session finishes.

Examples

The following code examples call the Synchronize method of a class that derives from SyncAgent, and then write information to the console. To view this code in the context of a complete example, see Getting Started: Client and Server Synchronization.

SampleSyncAgent sampleSyncAgent = new SampleSyncAgent();
SyncStatistics syncStatistics = sampleSyncAgent.Synchronize();
Console.WriteLine("Start Time: " + syncStatistics.SyncStartTime);
Console.WriteLine("Total Changes Downloaded: " + syncStatistics.TotalChangesDownloaded);
Console.WriteLine("Complete Time: " + syncStatistics.SyncCompleteTime);
Console.WriteLine(String.Empty);
Dim sampleSyncAgent As New SampleSyncAgent()
Dim syncStatistics As SyncStatistics = sampleSyncAgent.Synchronize()
Console.WriteLine("Start Time: " & syncStatistics.SyncStartTime)
Console.WriteLine("Total Changes Downloaded: " & syncStatistics.TotalChangesDownloaded)
Console.WriteLine("Complete Time: " & syncStatistics.SyncCompleteTime)
Console.WriteLine(String.Empty)

See Also

Reference

SyncAgent Class

Microsoft.Synchronization Namespace