コード例 #1
0
        /// <summary>
        /// Shuts down the specified virtual machine.
        /// </summary>
        /// <param name="vmObject">The <see cref="VSphereManagedObject" /> representing the virtual machine.</param>
        /// <exception cref="ArgumentNullException"><paramref name="vmObject" /> is null.</exception>
        public void ShutdownVirtualMachine(VSphereManagedObject vmObject)
        {
            if (vmObject == null)
            {
                throw new ArgumentNullException(nameof(vmObject));
            }

            _vimService.ShutdownGuest(vmObject.ManagedObjectReference);
        }