Xceed .NET Libraries Documentation
Xceed.Synchronization Assembly / Xceed.Synchronization Namespace / Synchronizer Class / EasySynchronize Method


In This Topic
    EasySynchronize Method
    In This Topic

    Starts the synchronization of the specified items. If provided, the remaining parameters control various aspects of the synchronization. Parameters can be specified in any order; if the same parameter is specified more than once, only the last occurence of the parameter value is used. If these parameters are not provided, default values are used. If an unsupported type is encountered, an ArgumentException is thrown. For details on the types of parameters recognized by this method, please see the documentation.

    When passed as a parameter to this method, the following types are added to the list of items to synchronize:Xceed.FileSystem.FileSystemItem[] and arrays of FileSystemItem-derived objects such as Xceed.FileSystem.AbstractFile[] and Xceed.FileSystem.AbstractFolder[], FileSystemItem, AbstractFile, AbstractFolder.

    Syntax
    'Declaration
     
    Public Shared Function EasySynchronize( _
       ByVal ParamArray parameters() As Object _
    ) As SynchronizationResult
    'Usage
     
    Dim parameters() As Object
    Dim value As SynchronizationResult
     
    value = Synchronizer.EasySynchronize(parameters)
    public static SynchronizationResult EasySynchronize( 
       params object[] parameters
    )

    Parameters

    parameters

    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.

    Remarks

    The following will be recursively scanned as parameters to parse:

    The following types control various aspects of the synchronization process:

    • Xceed.FileSystem.FileSystemEvents: A FileSystemEvents object that will be used to raise FileSystem events.
    • SynchronizationEvents: A SynchronizationEvents object that will be used to raise Synchronization events.
    • Filter or Filter[]: Filter objects that will be added to the item filter list.
    • Int32: 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 will be used to replace other items.
    • Int32[]: 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.
    • SynchronizationOptions: Tells the method how to behave in various situations.
    • FileSystemEventsUserDataParameter: A wrapper type containing an object that specifies opaque data that will be passed back to the event handler of both filesystem and synchronization events when they are raised.
    • SynchronizationEventsUserDataParameter: A wrapper type containing an object that specifies opaque data that will be passed back to the event handler of synchronization events when they are raised.
    • UserDataParameter: A wrapper type containing an object that specifies opaque data that will be passed back to the event handler of both FileSystem and synchronization events when they are raised.
    • MetadataItemParameter: A wrapper type containing a Xceed.FileSystem.FileSystemItem that specifies a location where metadata about the synchronization will be loaded and saved.
    • MasterItemParameter: A wrapper type containing a Xceed.FileSystem.FileSystemItem that specifies the master item for the synchronization.

      After all parameters are parsed, the item list will be searched in order to find the supplied Xceed.FileSystem.FileSystemItem. Its index will then be used.

      This value will be ignored if an Int32 is supplied in the parameters. Indexes always have priority over Xceed.FileSystem.FileSystemItem objects.

    • IrrelevantItemsParameter: A wrapper type containing a Xceed.FileSystem.FileSystemItem array that specifies FileSystemItems that are to 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.

      After all parameters are parsed, the item list will be searched in order to find the supplied Xceed.FileSystem.FileSystemItem objects. The indexes found will then be used as the irrelevant index list.

      These values will be ignored if an Int32[] is supplied in the parameters. Indexes always have priority over Xceed.FileSystem.FileSystemItems.

    • SynchronizeCommandParameter.ResetItemList: The list of items to synchronize up to this point is cleared.
    • SynchronizeCommandParameter.ResetFilterList: The list of item filters up to this point is cleared.
    • SynchronizeCommandParameter.ResetIrrelevantItemIndexList: The list of irrelevant item indexes up to this point is cleared.
    • SynchronizeCommandParameter.ResetParameters: All the parameters passed up to this point are cleared, including the items to synchronize.

    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