FindTypes() public method

Searches all assemblies of this AppDomain for all Types.
public FindTypes ( ) : List
return List
Esempio n. 1
0
        // Static Properties

        /// <summary>
        /// Finds the specified <paramref name="typeName"/> searching through all loaded assemblies.
        /// </summary>
        /// <param name="typeName">Fully qualified type name.</param>
        /// <returns>The <see cref="Type"/> found; otherwise <c>null</c>.</returns>
        public static Type FindType(string typeName)
        {
            lock (s_typeCache)
            {
                if (s_typeLookup.HasChanged)
                {
                    foreach (Type type in s_typeLookup.FindTypes())
                    {
                        s_typeCache[type.FullName !] = type;
Esempio n. 2
0
        // Static Properties

        /// <summary>
        /// Finds the specified <paramref name="typeName"/> searching through all loaded assemblies.
        /// </summary>
        /// <param name="typeName">Fully qualified type name.</param>
        /// <returns>The <see cref="Type"/> found; otherwise <c>null</c>.</returns>
        public static Type FindType(string typeName)
        {
            lock (s_typeCache)
            {
                Type result;

                if (s_typeLookup.HasChanged)
                {
                    foreach (Type type in s_typeLookup.FindTypes())
                    {
                        s_typeCache[type.FullName] = type;
                    }
                }

                s_typeCache.TryGetValue(typeName, out result);

                return(result);
            }
        }