Exemplo n.º 1
0
    public static string GetUniqueName <T>(this INamable namable, string newName, string oldName, string emptyName, IList <T> array) where T : INamable
    {
        string name = namable.GetUniqueName(newName, oldName, array);

        if (string.IsNullOrEmpty(newName))
        {
            name = namable.GetUniqueName(emptyName, oldName, array);
        }
        return(name);
    }
Exemplo n.º 2
0
        public static string GetUniqueName(this INamable namable, IList <INamable> array, string newName, string oldName, string emptyName)
        {
            string name = namable.GetUniqueName(array, newName, oldName);

            if (string.IsNullOrEmpty(newName))
            {
                name = namable.GetUniqueName(array, emptyName, oldName);
            }

            return(name);
        }
Exemplo n.º 3
0
 public static void SetUniqueName(this INamable namable, IList <INamable> array, string newName)
 {
     namable.Name = namable.GetUniqueName(array, newName, namable.Name);
 }
Exemplo n.º 4
0
 public static string GetUniqueName(this INamable namable, IList <INamable> array, string newName)
 {
     return(namable.GetUniqueName(array, newName, namable.Name));
 }
Exemplo n.º 5
0
 public static void SetUniqueName <T>(this INamable namable, string newName, IList <T> array) where T : INamable
 {
     namable.Name = namable.GetUniqueName(newName, namable.Name, array);
 }
Exemplo n.º 6
0
 public static string GetUniqueName <T>(this INamable namable, string newName, IList <T> array) where T : INamable
 {
     return(namable.GetUniqueName(newName, namable.Name, array));
 }