public async Task StartAsync()
 {
     if (_hcs.StartComputeSystem(_cs, null))
     {
         await _watcher.WatchAsync(HCS_NOTIFICATIONS.HcsNotificationSystemStartCompleted);
     }
 }
        public async Task WaitForExitAsync()
        {
            var result = await _watcher.WatchAsync(HCS_NOTIFICATIONS.HcsNotificationProcessExited);

            var processData = JsonHelper.FromJson <Schema.ProcessStatus>(result.Data);

            _exitCode = (int)processData.ExitCode;
            _exited   = true;
        }
示例#3
0
        public async Task StartAsync()
        {
            string result;

            if (HcsFunctions.ProcessHcsCall(HcsFunctions.HcsStartComputeSystem(_cs, null, out result), result))
            {
                await _watcher.WatchAsync(HCS_NOTIFICATIONS.HcsNotificationSystemStartCompleted);
            }
        }