FileSyncScopeFilter Class
Defines filters that can be used to include or exclude files and folders from the static synchronization scope.
Namespace: Microsoft.Synchronization.Files
Assembly: Microsoft.Synchronization.Files (in microsoft.synchronization.files.dll)
Syntax
'Declaration
Public Class FileSyncScopeFilter
'Usage
Dim instance As FileSyncScopeFilter
public class FileSyncScopeFilter
public ref class FileSyncScopeFilter
public class FileSyncScopeFilter
public class FileSyncScopeFilter
Remarks
The static filters are evaluated on change detection and are applied equally to all items in the synchronization scope. For an item to be included in the synchronization, it must pass all static filters. For example, if a file is both explicitly excluded and explicitly included, the file will be excluded from the scope.
The same scope filter should be used on all providers in a synchronization community. If not, unwanted behavior might occur.
The filter that is passed to FileSyncProvider is used to initialize the provider object based on the scope filter when it is passed in. Subsequent changes to the filter will not affect the scope filter that is used by that instance of the provider. To change the scope filter that is used, you must create a new file synchronization provider object.
Changing the scope of a replica after the first synchronization can cause unintended side effects. For example, suppose sometime after the first synchronization you change the scope on replica A to start excluding *.txt. This will cause all files that have a .txt extension to be treated by replica A as deleted. No files will actually be deleted from replica A. However, metadata for A will contain tombstones for .txt files, and A will send delete changes to other replicas for the .txt files. If you also exclude *.txt on replica B, there is no effect, because B will filter changes from A that pertain to .txt files. However, if replica B does not change its filter, the deleted files will flow to it, be treated as real change requests, and be deleted from replica B.
Inheritance Hierarchy
System.Object
Microsoft.Synchronization.Files.FileSyncScopeFilter
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
Reference
FileSyncScopeFilter Members
Microsoft.Synchronization.Files Namespace