ArcGIS Pro 2.9 API Reference Guide
RemoveReplicas Method

ArcGIS.Desktop.Mapping.Offline Namespace > GenerateOfflineMap Class : RemoveReplicas Method
The map whose replicas will be removed.
Removes all replicas from the map content. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public void RemoveReplicas( 
   Map map
)
Public Sub RemoveReplicas( _
   ByVal map As Map _
) 

Parameters

map
The map whose replicas will be removed.
Exceptions
ExceptionDescription
This method or property must be called within the lambda passed to QueuedTask.Run.
Map cannot be null
Map has no syncable content
Remarks
RemoveReplicas unregisters the corresponding replicas on the feature service. At the conclusion of RemoveReplicas, the local syncable layers are re-sourced to point back to their original feature service (and not the local content). Any un-sync'd edits present in the local content are lost. Call SynchronizeReplicas first to sync any unsync'd edits before calling RemoveReplicas.
If a map contains a local replica that was previously unregistered then attempting to unregister it again is treated as a no-op.
Call GetCanRemoveReplicas to determine if the map has local syncable content. Calling RemoveReplicas on a map with no syncable content will throw a System.InvalidOperationException. The local SQLite geodatabase containing the replicas unregistered on the service is not deleted.
Requirements

Target Platforms: Windows 11, Windows 10, Windows 8.1

See Also

Reference

GenerateOfflineMap Class
GenerateOfflineMap Members