public static string GetDefaultComplexListTermName(Template template) { string startingTermName = "New Complex List"; string termName = startingTermName; bool termNameExists = template.ComplexListTermNameInUse(termName, null); int counter = 1; while (termNameExists) { termName = string.Format("{0} {1}", startingTermName, counter); termNameExists = template.BasicTermExists(termName); } return termName; }
public static string GetDefaultBasicTermName(Template template) { string startingTermName = "New Term"; string termName = startingTermName; int counter = 1; while (template.BasicTermExists(termName)) { termName = string.Format("{0} {1}", startingTermName, counter++); } return termName; }