clean up and various little improvements after search for static wasted memory objects (not found) At this point it appears I don't have any leaks and it's all pretty efficient.

This commit is contained in:
2020-06-05 23:36:44 +00:00
parent cbf65f9046
commit bbcbdd86d0
17 changed files with 56 additions and 409 deletions

View File

@@ -90,32 +90,6 @@ namespace AyaNova.Util
}
// /// <summary>
// /// Make a unique but duplicate object name of desired length
// /// (Used by Duplicate object function)
// /// </summary>
// /// <param name="s"></param>
// /// <param name="maxLength"></param>
// /// <returns></returns>
// public static string NameUniquify(string s, int maxLength)
// {
// //Unique string
// string unique = " - " + DateUtil.SortableShortCurrentDateTimeValue;
// string ret = s + unique;
// var diff = maxLength - ret.Length;
// if (diff < 0)
// {
// if (unique.Length >= maxLength)
// {
// throw new System.ArgumentOutOfRangeException("StringUtil::nameUniquify - maxlength> unique value, source field too short for this function?");
// }
// ret = s.Substring(0, Math.Abs(diff)) + unique;
// }
// return ret;
// }
//Used to ensure a unique name generated by appending -nnn is within length requirements by splitting and chopping part of text to keep name
public static string UniqueNameBuilder(string oldName, long appendValue, int maxLength)
{