Sync custom items: Create a SiteSync log entry
Every time you create a new item inside folder Test
, the event handler for the Created
event is called. Inside this handler, you must create a site sync log entry for each target server.
To do this, you use the dataStore
object and set the corresponding properties for the log entry in the following way:
RESULT: Every time you create a new folder or file inside the Test
folder, a log entry for the created item is logged in the database.
NOTE: Immediately after you create a new folder or file, the event is raised. It gets the first (default) name of the item. Therefore, if you want to change the default name of the item, you must implement an event handler for the Renamed
event of the FileSystemWatcher
class.