Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static class KnownTypesHelper
- {
- public static IEnumerable<Type> GetKnownTypes<T>()
- {
- var list = new List<Type>();
- var queryTypes = typeof(T).Assembly.GetExportedTypes()
- .Where(x => typeof(T).IsAssignableFrom(x) && !x.IsGenericTypeDefinition);
- list.AddRange(queryTypes);
- return list;
- }
- }
Add Comment
Please, Sign In to add comment