GetCanRemoveReplicas Method
Remove Replicas for Syncable Content
//namespace ArcGIS.Desktop.Mapping.Offline
var extent = MapView.Active.Extent;
var map = MapView.Active.Map;
//await if needed...
QueuedTask.Run(() =>
{
//Check map has local syncable content
//Either..
//var canSyncContent = GenerateOfflineMap.Instance.GetCanSynchronizeReplicas(map);
//Or...both accomplish the same thing...
var canRemove = GenerateOfflineMap.Instance.GetCanRemoveReplicas(map);
if (canRemove)
{
//Remove Replicas - any unsync'd changes are lost
//Call sync _first_ to push any outstanding changes if
//needed. Local syncable content is re-sourced
//to point to the service
GenerateOfflineMap.Instance.RemoveReplicas(map);
}
});
Target Platforms: Windows 11, Windows 10
ArcGIS Pro version: 3 or higher.