Click or drag to resize

GeodatabaseSyncTaskSyncGeodatabase Method (SyncDirection, Boolean, Geodatabase)

Creates a job to synchronize a geodatabase back to its service using the given sync direction and rollback on failure boolean value.

Namespace:  Esri.ArcGISRuntime.Tasks.Offline
Assembly:  Esri.ArcGISRuntime (in Esri.ArcGISRuntime.dll) Version: 100.11.0
Syntax
public SyncGeodatabaseJob SyncGeodatabase(
	SyncDirection syncDirection,
	bool rollbackOnFailure,
	Geodatabase geodatabase
)

Parameters

syncDirection
Type: Esri.ArcGISRuntime.Tasks.OfflineSyncDirection
Sync direction to use when syncing the geodatabase
rollbackOnFailure
Type: SystemBoolean
true to rollback all changes to the service and/or the geodatabase if the job fails, false to accept any of the changes up until the point when the job fails
geodatabase
Type: Esri.ArcGISRuntime.DataGeodatabase
The geodatabase to sync

Return Value

Type: SyncGeodatabaseJob
The job that handles synchronizing the geodatabase.
Remarks

For a successfully completed job, the job's result returns a collection of SyncLayerResult, typically the collection is empty. If individual edits failed then the result collection provides these errors grouped by each table using SyncLayerResult instances which in turn contain each edit error.

If the given sync direction is not compatible with the sync task's feature service, the returned job will fail.

You should not execute more than one sync on a geodatabase at the same time. This includes any operations that export/import deltas from the local Geodatabase:

An exception will also be thrown if there is an active transaction on the geodatabase during sync.

See Also