public DisassemblerShould() { _assemblyDefinitionResolver = Substitute.For <IAssemblyDefinitionResolver>(); _assemblyProcessorMock = Substitute.For <IAssemblyDecompiler>(); var assemblyDefinition = Mono.Cecil.AssemblyDefinition.CreateAssembly( new AssemblyNameDefinition("test", Version.Parse("1.0.0")), "Module1", ModuleKind.Dll); _assemblyDefinitionResolver.Resolve(Arg.Any <string>()).Returns(assemblyDefinition); }
public Disassembler Create(CommandArgument argument) { var outputWriter = GetOutputWriter(argument); //HACK: Next step for refactoring. if (_assemblyDecompiler == null) { _assemblyDecompiler = new AssemblyDecompiler(argument.Assembly, outputWriter); } if (argument.HasOutputPathSet) { return(new FileOutputDisassembler(_assemblyDecompiler, _assemblyDefinitionResolver)); } return(new ConsoleOutputDisassembler(_assemblyDecompiler, _assemblyDefinitionResolver)); }
public FileOutputDisassembler(IAssemblyDecompiler assemblyDataProcessor, IAssemblyDefinitionResolver assemblyResolver) : base(assemblyDataProcessor, assemblyResolver) { }
public Disassembler(IAssemblyDecompiler assemblyDataProcessor, IAssemblyDefinitionResolver assemblyResolver) { _assemblyDataProcessor = assemblyDataProcessor; _assemblyResolver = assemblyResolver; }
public DisassemblerFactoryShould() { _assemblyDefinitionResolver = Substitute.For <IAssemblyDefinitionResolver>(); _assemblyDecompiler = Substitute.For <IAssemblyDecompiler>(); _disassemblerFactory = new DisassemblerFactory(_assemblyDefinitionResolver, _assemblyDecompiler); }
public DisassemblerFactory(IAssemblyDefinitionResolver assemblyDefinitionResolver, IAssemblyDecompiler assemblyDecompiler) { _assemblyDefinitionResolver = assemblyDefinitionResolver; _assemblyDecompiler = assemblyDecompiler; }