public IEnumerable<Assembly> LoadAssemblies(AbsoluteFolderPath assemblyFolder) { var assemblyResolveHandler = new AssemblyResolveHandler(assemblyFolder); Console.WriteLine("loading assemblies from " + assemblyFolder); List<string> assemblyPaths = Directory.EnumerateFiles(assemblyFolder, "*.exe") .Union(Directory.EnumerateFiles(assemblyFolder, "*.dll")).ToList(); Console.WriteLine("found assemblies:"); foreach (var assemblyPath in assemblyPaths) { Console.WriteLine(assemblyPath); } IEnumerable<Assembly> assemblies = assemblyPaths.Select(Assembly.LoadFile).ToList(); foreach (Assembly assembly in assemblies) { this.AddReferencedAssemblies(assembly); } return this.loadedAssemblies; }
public AssemblyResolveHandler(AbsoluteFolderPath assemblyFolder) { this.assemblyFolder = assemblyFolder; AppDomain currentDomain = AppDomain.CurrentDomain; currentDomain.AssemblyResolve += new ResolveEventHandler(this.HandleUnresolvedAssembly); }
public void IsAssignableToString() { AbsoluteFolderPath absolutePath = new AbsoluteFolderPath(Path); string path = absolutePath; path.Should().Be(Path); }
public void IsAssignableToString() { AbsoluteFolderPath absolutePath = new AbsoluteFolderPath(Path); string path = absolutePath; path.Should().Be(Path); }
public void SupportsEquals(string aa, string bb, bool expected) { AbsoluteFolderPath a = aa; AbsoluteFolderPath b = bb; bool result = a == b; result.Should().Be(expected); }
public void SupportsInequalityOperator(string aa, string bb, bool expected) { AbsoluteFolderPath a = aa; AbsoluteFolderPath b = bb; bool result = a != b; result.Should().Be(expected); }
public void IsAssignableFromString() { AbsoluteFolderPath absoluteFolderPath = Path; absoluteFolderPath.Value.Should().Be(Path); }
public void RepresentsAnAbsoluteFolderPath(string path) { var absoluteFolderPath = new AbsoluteFolderPath(path); absoluteFolderPath.Value.Should().Be(path); }
public void RepresentsAnAbsoluteFolderPath(string path) { var absoluteFolderPath = new AbsoluteFolderPath(path); absoluteFolderPath.Value.Should().Be(path); }
private CommandLineArguments(AbsoluteFilePath outputPath, AbsoluteFolderPath assemblyFolder, bool successful) { this.OutputPath = outputPath; this.AssemblyFolder = assemblyFolder; this.Successful = successful; }
public static CommandLineArguments CreateSuccessful( AbsoluteFilePath outputPath, AbsoluteFolderPath assemblyFolder) { return new CommandLineArguments(outputPath, assemblyFolder, true); }