/// <summary> /// Select a plugin manually. /// </summary> /// <returns>The manually selected plugin.</returns> private IFilePlugin GetManualSelection(IReadOnlyList <IFilePlugin> pluginList) { // 1. Request manual selection by the user var selectionArgs = new ManualSelectionEventArgs(pluginList); OnManualSelection?.Invoke(this, selectionArgs); return(selectionArgs.Result); }
// TODO: Maybe do not pass whole messages, since this message may not be universal for all UI's. Instead pass other atomic parameters to signalize this behaviour. /// <summary> /// Select a plugin manually. /// </summary> /// <returns>The manually selected plugin.</returns> private IFilePlugin GetManualSelection(string message, IReadOnlyList <IFilePlugin> filePluginList, string filterNote, IReadOnlyList <IFilePlugin> filteredPluginList) { // 1. Request manual selection by the user var selectionArgs = new ManualSelectionEventArgs(message, filePluginList, filterNote, filteredPluginList); OnManualSelection?.Invoke(this, selectionArgs); return(selectionArgs.Result); }
/// <summary> /// Select a plugin manually. /// </summary> /// <returns>The manually selected plugin.</returns> private IFilePlugin GetManualSelection() { // 1. Get all plugins that don't implement IIdentifyFile var nonIdentifiablePlugins = _filePluginLoaders.GetNonIdentifiableFilePlugins().ToArray(); // 2. Request manual selection by the user var selectionArgs = new ManualSelectionEventArgs(nonIdentifiablePlugins); OnManualSelection?.Invoke(this, selectionArgs); return(selectionArgs.Result); }
private void FileLoader_OnManualSelection(object sender, ManualSelectionEventArgs e) { OnManualSelection?.Invoke(sender, e); }