Jaa


ShutdownManager.BeginShutdown(ShutdownKind, TimeSpan) Method

Definition

Shuts down a device that runs in fixed-purpose mode, and optionally restarts the device after the specified number of seconds.

public:
 static void BeginShutdown(ShutdownKind shutdownKind, TimeSpan timeout);
 static void BeginShutdown(ShutdownKind const& shutdownKind, TimeSpan const& timeout);
public static void BeginShutdown(ShutdownKind shutdownKind, System.TimeSpan timeout);
function beginShutdown(shutdownKind, timeout)
Public Shared Sub BeginShutdown (shutdownKind As ShutdownKind, timeout As TimeSpan)

Parameters

shutdownKind
ShutdownKind

The type of shutdown to perform, either with or without restarting the device.

timeout
TimeSpan TimeSpan

The amount of time in seconds to wait before restarting the device if shutdownKind is ShutdownKind.Restart.

Windows requirements

App capabilities
systemManagement

Remarks

This API requires the use of the IoT systemManagement capability, and the inclusion of iot in the IgnorableNamespaces list. Users can add the following to their Package.appmanifest: <iot:Capability Name="systemManagement"/>, and add iot to their existing list of IgnorableNamespaces.

Applies to