public void Initialize() { AssemblyReader asmInfoProcessor = new AssemblyReader(); result = asmInfoProcessor.Read(dllPath); testClassType = typeof(TestClass); }
private async void OpenFile() { var assemblyFileType = new FileType(".NET Assembly (*.dll, *.exe)", ".dll;*.exe"); var allFileType = new FileType("All files (*.*)", ".*"); var result = fileDialogService.ShowOpenFileDialog(ShellViewModel.View, new[] { assemblyFileType, allFileType }); if (!result.IsValid) { return; } try { using (ShellViewModel.SetApplicationBusy()) { var assemblyApi = await Task.Run(() => AssemblyReader.Read(result.FileName)); AddAndSelectAssemblyApi(result.FileName, assemblyApi.version, assemblyApi.api); } } catch (Exception e) { messageService.ShowError(ShellViewModel.View, "Could not read the file. Error: " + e); } }
private async Task OpenFromNuget() { using (var controller = openFromNugetController.CreateExport()) { var result = await controller.Value.RunAsync(ShellViewModel.View); if (result.assemblyStream == null) { return; } using (ShellViewModel.SetApplicationBusy()) { var assemblyApi = await Task.Run(() => AssemblyReader.Read(result.assemblyStream, null)); AddAndSelectAssemblyApi(result.fileName, assemblyApi.version, assemblyApi.api); } } }