public bool DeleteShardListMap() { try { if (ShardMapManager == null) { return(false); } Shard tempShard = null; PointMapping <long> tempMapping = null; if (ShardMapManager.TryGetListShardMap(mapManagerName, out lsm)) { foreach (Shard shard in lsm.GetShards()) { // delete all mappings var allMappings = lsm.GetMappings(shard); for (int i = 0; i < allMappings.Count; i++) { lsm.MarkMappingOffline(allMappings[i]); if (lsm.TryGetMappingForKey(allMappings[i].Value, out tempMapping)) { lsm.DeleteMapping(tempMapping); } } // delete shard if (lsm.TryGetShard(shard.Location, out tempShard)) { lsm.DeleteShard(tempShard); } } } // clear shard map manager if (ShardMapManager.TryGetListShardMap(mapManagerName, out lsm)) { ShardMapManager.DeleteShardMap(lsm); } return(true); } catch { return(false); } }