Interface IPowerEnvironment
Represents the environment that a device can perform power on/off operations.
Inherited Members
Namespace: Microsoft.XboxStudios.DeviceConsole.Environments.Power
Assembly: DeviceConsole.Environments.dll
Syntax
public interface IPowerEnvironment : IDeviceEnvironment, IDeviceContainer, IHasConnectionStatus
Methods
View SourceRestartAsync(TimeSpan?)
Restarts the device.
Declaration
Task RestartAsync(TimeSpan? timeout = null)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan? | timeout | The timeout for the operation. |
Returns
Type | Description |
---|---|
Task | A task for the asynchronous operation. |
Remarks
A device may not finish restarting by the time the task finishes.
RestartAsync(CancellationToken)
Restarts the device.
Declaration
Task RestartAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The cancellation token for the operation. |
Returns
Type | Description |
---|---|
Task | A task for the asynchronous operation. |
Remarks
A device may not finish restarting by the time the task finishes.
ShutdownAsync(TimeSpan?)
Shutdowns the device.
Declaration
Task ShutdownAsync(TimeSpan? timeout = null)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan? | timeout | The timeout for the operation. |
Returns
Type | Description |
---|---|
Task | A task for the asynchronous operation. |
ShutdownAsync(CancellationToken)
Shutdowns the device.
Declaration
Task ShutdownAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The cancellation token for the operation. |
Returns
Type | Description |
---|---|
Task | A task for the asynchronous operation. |