master
cpp 53 lines 1.17 KB
Raw
1 /*++
2
3 Copyright (c) Microsoft. All rights reserved.
4
5 Module Name:
6
7 ImageRemoveCommand.cpp
8
9 Abstract:
10
11 Implementation of command execution logic.
12
13 --*/
14
15 #include "ImageCommand.h"
16 #include "CLIExecutionContext.h"
17 #include "ImageTasks.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 using namespace wsl::shared::string;
25
26 namespace wsl::windows::wslc {
27 // Image Remove Command
28 std::vector<Argument> ImageRemoveCommand::GetArguments() const
29 {
30 return {
31 Argument::Create(ArgType::ImageId, {.Required = true, .Limit = Limit::Unlimited}),
32 Argument::Create(ArgType::ImageForce),
33 Argument::Create(ArgType::NoPrune),
34 };
35 }
36
37 std::wstring ImageRemoveCommand::ShortDescription() const
38 {
39 return Localization::WSLCCLI_ImageRemoveDesc();
40 }
41
42 std::wstring ImageRemoveCommand::LongDescription() const
43 {
44 return Localization::WSLCCLI_ImageRemoveLongDesc();
45 }
46
47 void ImageRemoveCommand::ExecuteInternal(CLIExecutionContext& context) const
48 {
49 context //
50 << ResolveSession //
51 << DeleteImage;
52 }
53 } // namespace wsl::windows::wslc