Catel.Reflection.TypeCache.GetTypesImplementingInterface C# (CSharp) Method

GetTypesImplementingInterface() public static method

Gets the types implementing the specified interface.
public static GetTypesImplementingInterface ( Type interfaceType ) : System.Type[]
interfaceType System.Type Type of the interface.
return System.Type[]
        public static Type[] GetTypesImplementingInterface(Type interfaceType)
        {
            Argument.IsNotNull("interfaceType", interfaceType);

            lock (_lockObject)
            {
                if (!_typesByInterface.ContainsKey(interfaceType))
                {
                    _typesByInterface[interfaceType] = GetTypes(x =>
                    {
                        if (x == interfaceType)
                        {
                            return false;
                        }

                        return x.ImplementsInterfaceEx(interfaceType);
                    }).ToArray();
                }

                return _typesByInterface[interfaceType];
            }
        }