| 1 | /*++ |
| 2 | |
| 3 | Copyright (c) Microsoft. All rights reserved. |
| 4 | |
| 5 | Module Name: |
| 6 | |
| 7 | SessionTerminateCommand.cpp |
| 8 | |
| 9 | Abstract: |
| 10 | |
| 11 | Implementation of the session terminate 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 Terminate Command |
| 25 | std::vector<Argument> SessionTerminateCommand::GetArguments() const |
| 26 | { |
| 27 | return {}; |
| 28 | } |
| 29 | |
| 30 | std::wstring SessionTerminateCommand::ShortDescription() const |
| 31 | { |
| 32 | return Localization::WSLCCLI_SessionTerminateDesc(); |
| 33 | } |
| 34 | |
| 35 | std::wstring SessionTerminateCommand::LongDescription() const |
| 36 | { |
| 37 | return Localization::WSLCCLI_SessionTerminateLongDesc(); |
| 38 | } |
| 39 | |
| 40 | void SessionTerminateCommand::ExecuteInternal(CLIExecutionContext& context) const |
| 41 | { |
| 42 | context // |
| 43 | << OpenSessionIfSpecified // |
| 44 | << OpenDefaultSession // |
| 45 | << TerminateSession; |
| 46 | } |
| 47 | } // namespace wsl::windows::wslc |