public async void ShowPowerDialog(ShutdownKind kind) { var dialog = (kind == ShutdownKind.Restart ? RestartDialog : ShutdownDialog); var result = await dialog.ShowAsync(); if (result == ContentDialogResult.Primary && IsIoTDeviceFamily) { await CommService.DisconnectAsync(); ShutdownManager.BeginShutdown(kind, TimeSpan.FromSeconds(0)); } }
public void Dispose() { _ = commService.DisconnectAsync(); }