master
cpp 51 lines 1.18 KB
Raw
1 /*++
2
3 Copyright (c) Microsoft. All rights reserved.
4
5 Module Name:
6
7 ContainerExportCommand.cpp
8
9 Abstract:
10
11 Implementation of command execution logic.
12
13 --*/
14
15 #include "ContainerCommand.h"
16 #include "CLIExecutionContext.h"
17 #include "ContainerTasks.h"
18 #include "SessionTasks.h"
19 #include "Task.h"
20
21 using namespace wsl::windows::wslc::execution;
22 using namespace wsl::windows::wslc::task;
23 using namespace wsl::shared;
24
25 namespace wsl::windows::wslc {
26 // Container Export Command
27 std::vector<Argument> ContainerExportCommand::GetArguments() const
28 {
29 return {
30 Argument::Create(ArgType::ContainerId, {.Required = true}),
31 Argument::Create(ArgType::Output, {.Desc = Localization::WSLCCLI_ContainerExportOutputArgDescription()}),
32 };
33 }
34
35 std::wstring ContainerExportCommand::ShortDescription() const
36 {
37 return Localization::WSLCCLI_ContainerExportDesc();
38 }
39
40 std::wstring ContainerExportCommand::LongDescription() const
41 {
42 return Localization::WSLCCLI_ContainerExportLongDesc();
43 }
44
45 void ContainerExportCommand::ExecuteInternal(CLIExecutionContext& context) const
46 {
47 context //
48 << ResolveSession //
49 << ExportContainer;
50 }
51 } // namespace wsl::windows::wslc