Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- namespace ServiceLocatorApplication
- {
- public static class AppDomainExtensions
- {
- public static IEnumerable<Type> GetTypes(this System.AppDomain domain)
- {
- return domain.GetAssemblies().SelectMany(s => {
- try {
- return s.GetTypes();
- } catch (System.Reflection.ReflectionTypeLoadException) {
- return new Type[0];
- }
- });
- }
- }
- }
Add Comment
Please, Sign In to add comment