using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; using System.Reflection; namespace OpenSEMI.Core.Container { internal class ParameterCache { private static ConcurrentDictionary> _parameterCache = new ConcurrentDictionary>(); public static List GetParameters(ConstructorInfo constructor) { if (!_parameterCache.TryGetValue(constructor, out List value)) { List list2 = _parameterCache[constructor] = DiscoverParameters(constructor); value = list2; return value; } return value; } private static List DiscoverParameters(ConstructorInfo constructor) { return constructor.GetParameters().ToList(); } } }