public OpenVisualStudioCommand( IPromptCommandService promptCommandService, IFileService directoryService) : base(typeof(OpenVisualStudioCommand).Namespace, nameof(OpenVisualStudioCommand), HelpDefinition) { RootParameter = new CommandParameterDefinition( "root", CommandParameterDefinition.TypeValue.Boolean, "Indicates if open the program as administrator"); PromptCommandService = promptCommandService ?? throw new ArgumentNullException(nameof(promptCommandService)); DirectoryService = directoryService ?? throw new ArgumentNullException(nameof(directoryService)); }
public OpenRepoCommand( IFileService directoryService, IPromptCommandService promptCommandService, IClipboardService clipboardService) : base(typeof(OpenRepoCommand).Namespace, nameof(OpenRepoCommand), HelpDefinition) { NameParameter = new CommandParameterDefinition( "name", CommandParameterDefinition.TypeValue.String, "Indicates the name or part of it for search and open this folder", "n"); CommandParametersDefinition.Add(NameParameter); DirectoryService = directoryService ?? throw new ArgumentNullException(nameof(directoryService)); PromptCommandService = promptCommandService ?? throw new ArgumentNullException(nameof(promptCommandService)); ClipboardService = clipboardService ?? throw new ArgumentNullException(nameof(clipboardService)); }
public WindowsCmdCommand(IPromptCommandService promptCommandService) : base(typeof(WindowsCmdCommand).Namespace, nameof(WindowsCmdCommand), HelpDefinition) { CommandCmdParameter = new CommandParameterDefinition("command", CommandParameterDefinition.TypeValue.String, "Command name for the alias", "c"); CommandWorkingDirectoryParameter = new CommandParameterDefinition("workingdirectory", CommandParameterDefinition.TypeValue.String, "Working directory", "w"); CommandFilenameParameter = new CommandParameterDefinition("filename", CommandParameterDefinition.TypeValue.String, "File name", "f"); RegisterCommandParameter(CommandCmdParameter); RegisterCommandParameter(CommandWorkingDirectoryParameter); RegisterCommandParameter(CommandFilenameParameter); PromptCommandService = promptCommandService ?? throw new ArgumentNullException(nameof(promptCommandService)); }