FileSyncProvider.DetectChanges Method

Triggers an enumeration of the local file system replica for changes, and updates the metadata appropriately.

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

Syntax

'Declaration
Public Sub DetectChanges
'Usage
Dim instance As FileSyncProvider

instance.DetectChanges()
public void DetectChanges()
public:
void DetectChanges()
member DetectChanges : unit -> unit 
public function DetectChanges()

Exceptions

Exception Condition
ObjectDisposedException

The object has been disposed or was not property initialized.

Remarks

An application does not have to call this method. This method is provided for applications that want more precise control over when change detection occurs.

If the ExplicitDetectChanges flag was not set in the provider's constructor, the provider will implicitly do change detection on the first call to the provider’s GetChangeBatch or ProcessChangeBatch method for each synchronization.

If the ExplicitDetectChanges flag was set, the application should explicitly call DetectChanges to detect local file system changes before it starts a synchronization session.

See Also

Reference

FileSyncProvider Class

Microsoft.Synchronization.Files Namespace