using System.Collections; using System.Collections.Generic; using System.IO; using System.CommandLine; using System.Threading.Tasks; namespace MCCFMD.Commands { public class Install : Command { const string NAME = "install"; const string DESC = "Install the profile described by the manifest."; public Install(DirectoryInfo workspaceDir) : base(NAME, DESC) { Argument profileFile = new Argument("profile", "The .zip file describing the profile to install."); Add(profileFile); Option destination = new Option("--destination", "Where to install the profile."); destination.AddAlias("-d"); Add(destination); Option server = new Option("--server", "Install server files."); server.AddAlias("-s"); Add(server); Option client = new Option("--client", "Install files in local client."); client.AddAlias("-c"); Add(client); Option fileExclude = new Option("--exclude-file", "Excludes files with IDs listed in a given file."); fileExclude.AddAlias("-E"); Add(fileExclude); Option fileInclude = new Option("--include-file", "Includes files with IDs listed in a given file."); fileInclude.AddAlias("-I"); Add(fileInclude); Option> excludeIds = new Option> ("--exclude-id", "Excludes the files with the given IDs."); excludeIds.AllowMultipleArgumentsPerToken = true; excludeIds.AddAlias("-e"); Add(excludeIds); Option> includeIds = new Option>("--include-id", "Include the files with the given IDs"); includeIds.AllowMultipleArgumentsPerToken = true; includeIds.AddAlias("-i"); Add(includeIds); this.SetHandler(async (FileInfo profileFile, DirectoryInfo? dest, bool server, bool client, FileInfo? fileExclude, FileInfo? fileInclude, IEnumerable excludeIds, IEnumerable includeIds) => { }, profileFile, destination, client, fileExclude, fileInclude, excludeIds, includeIds); } } }