コード例 #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));
 }