예제 #1
0
        public async Task TurnOn()
        {
            if (PowerState)
            {
                return;
            }

            _powerStateUpdating = true;

            await _virtualMachine.StartAsync();

            var refreshTask = Task.Run(() => _virtualMachine.RefreshInstanceViewAsync());
            await refreshTask.ContinueWith(_ => _powerStateUpdating = false);
        }