private static async Task <int> HandleDragAndDropCommand(FileSystemInfo target) { switch (target) { case FileInfo file: { return(await AddonHandling.ExtractAddonFile(file, null)); } case DirectoryInfo folder: { return(await AddonHandling.CreateAddonFile(folder, null)); } } Console.Error.WriteLine("Cannot handle drag and drop action."); return(1); }
private static async Task <int> ExtractAddonFileCommand(FileInfo file, DirectoryInfo @out, bool warninvalid = false) { return(await AddonHandling.ExtractAddonFile(file, @out, warninvalid)); }
private static async Task <int> CreateAddonFileCommand(DirectoryInfo folder, FileInfo @out, bool warninvalid = false) { return(await AddonHandling.CreateAddonFile(folder, @out, warninvalid)); }