private static string GenerateBaseGroupName(ITileSetDefinition tsd) { int counter = 0; string name = Strings.BaseLayerGroup; if (tsd.GroupExists(name)) { counter++; name = Strings.BaseLayerGroup + counter; } while (tsd.GroupExists(name)) { counter++; name = Strings.BaseLayerGroup + counter; } return(name); }