From ca736aba5d440c81a7c1d65af8ed1553e6a3da40 Mon Sep 17 00:00:00 2001 From: LDj3SNuD <35856442+LDj3SNuD@users.noreply.github.com> Date: Tue, 10 Sep 2019 23:01:52 +0200 Subject: [PATCH] Delete DelegateCache.cs --- ARMeilleure/Translation/DelegateCache.cs | 26 ------------------------ 1 file changed, 26 deletions(-) delete mode 100644 ARMeilleure/Translation/DelegateCache.cs diff --git a/ARMeilleure/Translation/DelegateCache.cs b/ARMeilleure/Translation/DelegateCache.cs deleted file mode 100644 index 7328c61a67..0000000000 --- a/ARMeilleure/Translation/DelegateCache.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Collections.Concurrent; -using System.Reflection; - -namespace ARMeilleure.Translation -{ - static class DelegateCache - { - private static ConcurrentDictionary _delegates; - - static DelegateCache() - { - _delegates = new ConcurrentDictionary(); - } - - public static Delegate GetOrAdd(Delegate dlg) - { - return _delegates.GetOrAdd(GetKey(dlg.Method), (key) => dlg); - } - - private static string GetKey(MethodInfo info) - { - return $"{info.DeclaringType.FullName}.{info.Name}"; - } - } -} \ No newline at end of file