From 89c8adc57b3da7b289a42bb66f1f1f02218738a1 Mon Sep 17 00:00:00 2001 From: Michael Krisper <michael.krisper@tugraz.at> Date: Wed, 3 Aug 2016 15:11:24 +0200 Subject: [PATCH] EnumHelper: removed not needed function --- VectoCommon/VectoCommon/Utils/EnumHelper.cs | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/VectoCommon/VectoCommon/Utils/EnumHelper.cs b/VectoCommon/VectoCommon/Utils/EnumHelper.cs index bf5646b8b4..4c740966a6 100644 --- a/VectoCommon/VectoCommon/Utils/EnumHelper.cs +++ b/VectoCommon/VectoCommon/Utils/EnumHelper.cs @@ -33,7 +33,6 @@ using System; using System.Collections.Generic; using System.Linq; using System.Runtime.CompilerServices; -using System.Text.RegularExpressions; namespace TUGraz.VectoCommon.Utils { @@ -48,22 +47,5 @@ namespace TUGraz.VectoCommon.Utils { return Enum.GetValues(typeof(T)).Cast<T>(); } - - private static readonly Dictionary<Type, Dictionary<Enum, string>> Names = - new Dictionary<Type, Dictionary<Enum, string>>(); - - [MethodImpl(MethodImplOptions.Synchronized)] - public static string AsString(this Enum e) - { - var t = e.GetType(); - if (!Names.ContainsKey(t)) { - Names[t] = new Dictionary<Enum, string> { { e, e.ToString() } }; - } - if (!Names[t].ContainsKey(e)) { - Names[t][e] = e.ToString(); - } - - return Names[t][e]; - } } } \ No newline at end of file -- GitLab