Ejemplo n.º 1
0
 public void Include(string path)
 {
   string directory = System.IO.Path.GetDirectoryName(path);
   if (!_directories.Contains(directory))
   {
     _directories.Add(directory);
   }
   AssemblyDefinition definition = AssemblyFactory.GetAssembly(path);
   TopDownVisitor visitor = new TopDownVisitor(_modelCreator, new VisitationOptions(true));
   visitor.Visit(definition);
 }
Ejemplo n.º 2
0
 public void Load(IEnumerable<Assembly> assemblies)
 {
   Stopwatch sw = new Stopwatch();
   sw.Start();
   List<TypeKey> types = assemblies.KeysForPendingTypes();
   List<MethodKey> methods = assemblies.KeysForPendingMethods();
   foreach (Assembly assembly in assemblies.AssembliesWithPendingTypes())
   {
     assembly.IsDependency = true;
   }
   foreach (AssemblyDefinition definition in _externalAssemblyLoader.FindExternalAssemblyDefinitions(assemblies))
   {
     TopDownVisitor visitor = new TopDownVisitor(_modelCreator, new VisitationOptions(false, types, methods));
     visitor.Visit(definition);
     _log.Info(sw.Elapsed.TotalSeconds + " - "  + definition.Name.Name);
   }
   _log.Info(sw.Elapsed.TotalSeconds);
 }