master
cpp 53 lines 1.34 KB
Raw
1 /*++
2
3 Copyright (c) Microsoft. All rights reserved.
4
5 Module Name:
6
7 SessionCommand.cpp
8
9 Abstract:
10
11 Implementation of SessionCommand command tree.
12
13 --*/
14 #include "CLIExecutionContext.h"
15 #include "ExecutionContextData.h"
16 #include "SessionCommand.h"
17
18 using namespace wsl::windows::wslc::execution;
19 using namespace wsl::shared;
20
21 namespace wsl::windows::wslc {
22 // Session Root Command
23 std::vector<std::unique_ptr<Command>> SessionCommand::GetCommands() const
24 {
25 std::vector<std::unique_ptr<Command>> commands;
26 commands.push_back(std::make_unique<SessionEnterCommand>(FullName()));
27 commands.push_back(std::make_unique<SessionListCommand>(FullName()));
28 commands.push_back(std::make_unique<SessionRunCommand>(FullName()));
29 commands.push_back(std::make_unique<SessionShellCommand>(FullName()));
30 commands.push_back(std::make_unique<SessionTerminateCommand>(FullName()));
31 return commands;
32 }
33
34 std::vector<Argument> SessionCommand::GetArguments() const
35 {
36 return {};
37 }
38
39 std::wstring SessionCommand::ShortDescription() const
40 {
41 return Localization::WSLCCLI_SessionCommandDesc();
42 }
43
44 std::wstring SessionCommand::LongDescription() const
45 {
46 return Localization::WSLCCLI_SessionCommandLongDesc();
47 }
48
49 void SessionCommand::ExecuteInternal(CLIExecutionContext& context) const
50 {
51 OutputHelp(context.Terminal);
52 }
53 } // namespace wsl::windows::wslc