private void ExtractSelection(object argument) { try { var folderPath = argument as string; if (!Directory.Exists(folderPath)) { throw new Exception("Directory doesn't exists."); } var selectedEntryNames = Entries.Where(item => item.IsSelected).Select(item => item.Name).ToList(); _epfArchive.ExtractProgress += _epfArchive_ExtractProgress; _epfArchive.ExtractEntries(folderPath, selectedEntryNames); } catch (Exception ex) { Status.Log.Error($"Unable to extract entries. Reason: {ex.Message}"); } finally { _epfArchive.ExtractProgress -= _epfArchive_ExtractProgress; } }