private IClassInfo Get(Type type) { if (!_classes.TryGetValue(type, out IClassInfo result)) { result = new MarkUnitClass(_assemblyReader.LoadAssembly(new AssemblyWrapper(type.Assembly)), type); } return(result); }
private void ReadAllAssembliesInDirectory() { Console.Write("read assemblies: "); foreach (var file in Directory.EnumerateFiles(Path).Where(MightBeAssembly)) { try { Console.Write("."); _assembliesInDirectory.Add(_assemblyReader.LoadAssembly(file)); } catch (Exception ex) { Console.WriteLine("EXCEPTION Try Load " + file); Console.WriteLine(ex.Message); } } Console.WriteLine(); }