Пример #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);
    }
Пример #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);
        }
Пример #3
0
 public static void SetUniqueName(this INamable namable, IList <INamable> array, string newName)
 {
     namable.Name = namable.GetUniqueName(array, newName, namable.Name);
 }
Пример #4
0
 public static string GetUniqueName(this INamable namable, IList <INamable> array, string newName)
 {
     return(namable.GetUniqueName(array, newName, namable.Name));
 }
Пример #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);
 }
Пример #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));
 }