mirror of
https://github.com/aphrody-labs/WSL.git
synced 2026-10-15 06:09:04 +00:00
* Run the documentation pipeline when doc/ is edited + various rendering fixes * Fix inverted condition
20 lines
291 B
Markdown
20 lines
291 B
Markdown
# ContainerState
|
|
|
|
`Container::State()` casts directly from `WslcContainerState`.
|
|
|
|
Underlying C values:
|
|
|
|
- `Invalid = 0`
|
|
- `Created = 1`
|
|
- `Running = 2`
|
|
- `Exited = 3`
|
|
- `Deleted = 4`
|
|
|
|
```cpp
|
|
auto state = container.State();
|
|
if (state == static_cast<ContainerState>(2))
|
|
{
|
|
// running
|
|
}
|
|
```
|