public VMOperationHostCommand(IMainWindow mainWindow, IEnumerable <SelectedItem> vms, GetHostForVM getHostForVM, string text, vm_operations operation, Session session) : base(mainWindow, vms, operation) { Util.ThrowIfParameterNull(session, "session"); Util.ThrowIfParameterNull(getHostForVM, "getHostForVM"); Util.ThrowIfParameterNull(text, "text"); _text = text; _getHostForVM = getHostForVM; foreach (SelectedItem item in vms) { VM vm = (VM)item.XenObject; string reason = GetVmCannotBootOnHostReason(vm, GetHost(vm), session, operation); if (reason == null) { _noneCanBoot = false; } else { _cantBootReasons[vm] = reason; } } }
public VMOperationHostCommand(IMainWindow mainWindow, IEnumerable<SelectedItem> vms, GetHostForVM getHostForVM, string text, vm_operations operation, Session session) : base(mainWindow, vms, operation) { Util.ThrowIfParameterNull(session, "session"); Util.ThrowIfParameterNull(getHostForVM, "getHostForVM"); Util.ThrowIfParameterNull(text, "text"); _text = text; _getHostForVM = getHostForVM; foreach (SelectedItem item in vms) { VM vm = (VM)item.XenObject; string reason = GetVmCannotBootOnHostReason(vm, GetHost(vm), session, operation); _cantBootReasons[vm] = reason; if (reason == null) _noneCanBoot = false; } }