本文整理汇总了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);
}