Xceed .NET Libraries Documentation
Xceed.Synchronization Assembly / Xceed.Synchronization Namespace / Synchronizer Class / Synchronize Method / Synchronize(FileSystemEvents,Object,SynchronizationEvents,Object,SynchronizationOptions,Int32,FileSystemItem,IList,IList,Filter[]) Method
A Xceed.FileSystem.FileSystemEvents object that will be used to raise Xceed.FileSystem events. Can be a null reference (Nothing in Visual Basic).
Opaque data that is sent back to the event handler when a Xceed.FileSystem event is raised.
A SynchronizationEvents object that will be used to raise Xceed.Synchronization events. Can be a null reference (Nothing in Visual Basic).
Opaque data that is sent back to the event handler when a synchronization event is raised.
A SynchronizationOptions object representing the options to use during the synchronization process. Can be a null reference (Nothing in Visual Basic).
A value used to specify the index of the master item for the synchronization. The master item is the item that will be considered to be up to date and used to replace other items. Using a negative value specified no master and tells the method to find one automatically.
A Xceed.FileSystem.FileSystemItem object representing the location where meta data, if enabled, can be accessed. Can be a null reference (Nothing in Visual Basic).
The items to be synchronized. Can be a null reference (Nothing in Visual Basic).
An array of integers that contains indexes into the item list. These indexes identify items in the item list that should be considered irrelevant. An irrelevant item will still participate in the synchronization as normal. But it will be excluded from being selected as the master item.
An array of Xceed.FileSystem.Filter objects, which will be used to filter the specified synchronization items. Can be a null reference (Nothing in Visual Basic).


In This Topic
    Synchronize(FileSystemEvents,Object,SynchronizationEvents,Object,SynchronizationOptions,Int32,FileSystemItem,IList,IList,Filter[]) Method
    In This Topic
    Starts the synchronization of the specified items.

    This version of the Synchronize method is pointed to by all other versions of Synchronize, as it specifies all of the parameters.

    Syntax
    'Declaration
     
    Public Overloads Shared Function Synchronize( _
       ByVal fileSystemEvents As FileSystemEvents, _
       ByVal fileSystemEventsUserData As Object, _
       ByVal synchronizationEvents As SynchronizationEvents, _
       ByVal synchronizationEventsUserData As Object, _
       ByVal options As SynchronizationOptions, _
       ByVal masterItemIndex As Integer, _
       ByVal metaDataItem As FileSystemItem, _
       ByVal items As IList, _
       ByVal irrelevantItemIndexes As IList, _
       ByVal filters() As Filter _
    ) As SynchronizationResult
    'Usage
     
    Dim fileSystemEvents As FileSystemEvents
    Dim fileSystemEventsUserData As Object
    Dim synchronizationEvents As SynchronizationEvents
    Dim synchronizationEventsUserData As Object
    Dim options As SynchronizationOptions
    Dim masterItemIndex As Integer
    Dim metaDataItem As FileSystemItem
    Dim items As IList
    Dim irrelevantItemIndexes As IList
    Dim filters() As Filter
    Dim value As SynchronizationResult
     
    value = Synchronizer.Synchronize(fileSystemEvents, fileSystemEventsUserData, synchronizationEvents, synchronizationEventsUserData, options, masterItemIndex, metaDataItem, items, irrelevantItemIndexes, filters)

    Parameters

    fileSystemEvents
    A Xceed.FileSystem.FileSystemEvents object that will be used to raise Xceed.FileSystem events. Can be a null reference (Nothing in Visual Basic).
    fileSystemEventsUserData
    Opaque data that is sent back to the event handler when a Xceed.FileSystem event is raised.
    synchronizationEvents
    A SynchronizationEvents object that will be used to raise Xceed.Synchronization events. Can be a null reference (Nothing in Visual Basic).
    synchronizationEventsUserData
    Opaque data that is sent back to the event handler when a synchronization event is raised.
    options
    A SynchronizationOptions object representing the options to use during the synchronization process. Can be a null reference (Nothing in Visual Basic).
    masterItemIndex
    A value used to specify the index of the master item for the synchronization. The master item is the item that will be considered to be up to date and used to replace other items. Using a negative value specified no master and tells the method to find one automatically.
    metaDataItem
    A Xceed.FileSystem.FileSystemItem object representing the location where meta data, if enabled, can be accessed. Can be a null reference (Nothing in Visual Basic).
    items
    The items to be synchronized. Can be a null reference (Nothing in Visual Basic).
    irrelevantItemIndexes
    An array of integers that contains indexes into the item list. These indexes identify items in the item list that should be considered irrelevant. An irrelevant item will still participate in the synchronization as normal. But it will be excluded from being selected as the master item.
    filters
    An array of Xceed.FileSystem.Filter objects, which will be used to filter the specified synchronization items. Can be a null reference (Nothing in Visual Basic).

    Return Value

    A SynchronizationResult value that specifies one or more results from the synchronization. The value is a set of flags. Typically, a value with the SynchronizationResult.ItemsSynchronized bit set indicates success; when the bit is not set, it means that no files were synchronized, indicating some kind of failure.

    In success or failure, the other bit values of the SynchronizationResult enumeration give useful information on what did or did not happen during the synchronization.

    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also