commit 68ebdee69c23748c426f0aeddcad220af4ee7a86
parent 617b5f9ab27c5f5563106505afc545830ee7277c
Author: Mikolaj Lenczewski <33129490+EnderRifter@users.noreply.github.com>
Date: Mon, 8 Jul 2019 13:46:35 +0100
Fully cleaned solution from all dead code.
Diffstat:
1 file changed, 0 insertions(+), 32 deletions(-)
diff --git a/StarSim/StarSimLib/Constants.cs b/StarSim/StarSimLib/Constants.cs
@@ -96,37 +96,5 @@ namespace StarSimLib
/// The <see cref="Octant"/> instance representing the rendered universe.
/// </summary>
public static readonly Octant UniverseOctant = new Octant(new Vector4(), UniverseSize);
-
- /// <summary>
- /// Converts an enumerable to its string form.
- /// </summary>
- /// <typeparam name="T">The type of item held in the enumerable.</typeparam>
- /// <param name="enumerable">The enumerable instance to convert.</param>
- /// <param name="itemPrinter">
- /// The function used to convert a single item to a string, defaults to <see cref="object.ToString()"/></param>
- /// <returns>The string representing the given enumerable.</returns>
- public static string ConvertEnumerableToString<T>(IEnumerable<T> enumerable, Func<T, string> itemPrinter = null)
- {
- StringBuilder enumerableStringBuilder = new StringBuilder("[");
-
- if (itemPrinter == null)
- {
- foreach (T item in enumerable)
- {
- enumerableStringBuilder.Append($"{item?.ToString() ?? "null"},");
- }
- }
- else
- {
- foreach (T item in enumerable)
- {
- enumerableStringBuilder.Append($"{itemPrinter(item) ?? "null"},");
- }
- }
-
- enumerableStringBuilder.Append("]");
-
- return enumerableStringBuilder.ToString();
- }
}
}
\ No newline at end of file