Sample Code Structure

The sample code in IncrementalSynchronize.sln is split into the following classes:

MyState Handles access to the datastore and provides methods for updating and querying the table.
MySynchronize Handles the synchronize action and depends upon MyState.
MyConnector This is the main connector class. It uses the MySynchronize class to handle the synchronize action.

Stop Requests

Like the Simple version of the connector (see A Complete Synchronize Action), this version must respond to stop requests. In addition to checking SynchronizeTask.Stopping() this connector makes use of the StopException. If MySynchronize.IngestFile detects that the connector has been instructed to stop it throws a StopException. As this is not caught the synchronize action will finish.