internal string MakeNameUnique(string name) { if (!Guids.ContainsKey(name)) { return(name); } string result; int count = 1; do { result = string.Format("{0}({1})", name, count); count++; } while (Guids.ContainsKey(result)); return(result); }
private static Guid?GetGuid(this SpecialFolders specialFolder) => Guids.ContainsKey(specialFolder) ? (Guid?)Guids[specialFolder] : null;