master
cpp 47 lines 1.07 KB
Raw
1 /*++
2
3 Copyright (c) Microsoft. All rights reserved.
4
5 Module Name:
6
7 SessionRunCommand.cpp
8
9 Abstract:
10
11 Implementation of the session run command.
12
13 --*/
14 #include "CLIExecutionContext.h"
15 #include "SessionCommand.h"
16 #include "SessionTasks.h"
17 #include "Task.h"
18
19 using namespace wsl::windows::wslc::execution;
20 using namespace wsl::windows::wslc::task;
21 using namespace wsl::shared;
22
23 namespace wsl::windows::wslc {
24 // Session Run Command
25 std::vector<Argument> SessionRunCommand::GetArguments() const
26 {
27 return {
28 Argument::Create(ArgType::Command, {.Required = true}),
29 Argument::Create(ArgType::ForwardArgs, {.Desc = Localization::WSLCCLI_SessionRunForwardArgsDescription()}),
30 };
31 }
32
33 std::wstring SessionRunCommand::ShortDescription() const
34 {
35 return Localization::WSLCCLI_SessionRunDesc();
36 }
37
38 std::wstring SessionRunCommand::LongDescription() const
39 {
40 return Localization::WSLCCLI_SessionRunLongDesc();
41 }
42
43 void SessionRunCommand::ExecuteInternal(CLIExecutionContext& context) const
44 {
45 context << ResolveSession << RunInSession;
46 }
47 } // namespace wsl::windows::wslc