本文整理匯總了C#中XenAPI.Host.IsMaster方法的典型用法代碼示例。如果您正苦於以下問題:C# Host.IsMaster方法的具體用法?C# Host.IsMaster怎麽用?C# Host.IsMaster使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類XenAPI.Host
的用法示例。
在下文中一共展示了Host.IsMaster方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: EnterMaintenanceMode
private void EnterMaintenanceMode(Host host)
{
Pool pool = Helpers.GetPool(host.Connection);
if (pool != null && pool.ha_enabled && host.IsMaster())
{
new ThreeButtonDialog(
new ThreeButtonDialog.Details(
SystemIcons.Error,
String.Format(Messages.HA_CANNOT_EVACUATE_MASTER,
Helpers.GetName(host).Ellipsise(Helpers.DEFAULT_NAME_TRIM_LENGTH)),
Messages.XENCENTER)).ShowDialog(Parent);
}
else
{
MainWindowCommandInterface.ShowPerXenModelObjectWizard(host, new EvacuateHostDialog(host));
}
}
示例2: HostCannotParticipateInPowerManagement
private bool HostCannotParticipateInPowerManagement(Host host)
{
return host.IsMaster() || (string.IsNullOrEmpty(host.power_on_mode) && Helpers.MidnightRideOrGreater(_connection));
}
示例3: IsSlave
protected static bool IsSlave(Host host)
{
return !host.IsMaster();
}
示例4: IsMaster
protected static bool IsMaster(Host host)
{
return host.IsMaster();
}
示例5: DataGridViewRowUpgrade
public DataGridViewRowUpgrade(Host host)
: this()
{
Host = host;
taskCell.Value = string.Format(Host.IsMaster() ? Messages.UPGRADE_POOL_MASTER : Messages.UPGRADE_SLAVE, host.Name);
UpdateStatus(HostUpgradeState.NotUpgraded, Messages.NOT_UPGRADED);
}
示例6: CanExecute
private static bool CanExecute(Host host)
{
bool disconnected = host.Connection != null && !host.Connection.IsConnected;
return disconnected || host.IsMaster();
}
示例7: HostCannotParticipateInPowerManagement
private bool HostCannotParticipateInPowerManagement(Host host)
{
return host.IsMaster() || string.IsNullOrEmpty(host.power_on_mode);
}