diff options
Diffstat (limited to 'ARMeilleure/Translation/DelegateCache.cs')
-rw-r--r-- | ARMeilleure/Translation/DelegateCache.cs | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/ARMeilleure/Translation/DelegateCache.cs b/ARMeilleure/Translation/DelegateCache.cs deleted file mode 100644 index 7328c61a..00000000 --- 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<string, Delegate> _delegates; - - static DelegateCache() - { - _delegates = new ConcurrentDictionary<string, Delegate>(); - } - - 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 |