public IEnumerable <Type> GetTypes(Func <Type, bool> where) { return(GetAssemblies().SelectMany( a => { try { return a.GetTypes().Where(t => where (t) && TypeFilters.All(func => func(t))); } catch { return new Type[0]; } })); }
public IEnumerable <Type> GetTypes(Func <Type, bool> where) { return(GetAssemblies().SelectMany( a => { try { return a.GetTypes().Where(t => where (t) && TypeFilters.All(func => func(t))); } catch (Exception exception) { var msg = string.Format("Loading assembly {0} failed: \n{1}", a.FullName, exception); Trace.TraceWarning(msg); Debugger.Log((int)TraceLevel.Warning, "AppDomainHelper", msg); return new Type[0]; } })); }