Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 private static Guid?GetGuid(this SpecialFolders specialFolder) => Guids.ContainsKey(specialFolder) ? (Guid?)Guids[specialFolder] : null;