public HostNotSafeToUpgradeWarning(Check check, Host host, HostNotSafeToUpgradeReason reason) : base(check) { _host = host; var newPartitionInfo = string.Format(Messages.NOT_SAFE_TO_UPGRADE_NEW_PARTITION_INFO, BrandManager.ProductVersionPost82); string detail; switch (reason) { case HostNotSafeToUpgradeReason.NotEnoughSpace: _shortMessage = Messages.NOT_SAFE_TO_UPGRADE_NOT_ENOUGH_SPACE; detail = string.Format(Messages.NOT_SAFE_TO_UPGRADE_NOT_ENOUGH_SPACE_WARNING, BrandManager.ProductVersionPost82); break; case HostNotSafeToUpgradeReason.VdiPresent: _shortMessage = Messages.NOT_SAFE_TO_UPGRADE_VDI_PRESENT; detail = string.Format(Messages.NOT_SAFE_TO_UPGRADE_VDI_PRESENT_WARNING, BrandManager.ProductVersionPost82); break; case HostNotSafeToUpgradeReason.UtilityPartitionPresent: _shortMessage = Messages.NOT_SAFE_TO_UPGRADE_UTILITY_PARTITION; detail = string.Format(Messages.NOT_SAFE_TO_UPGRADE_UTILITY_PARTITION_WARNING, BrandManager.ProductVersionPost82); break; case HostNotSafeToUpgradeReason.LegacyPartitionTable: _shortMessage = Messages.NOT_SAFE_TO_UPGRADE_LEGACY_PARTITION_TABLE; detail = string.Format(Messages.NOT_SAFE_TO_UPGRADE_LEGACY_PARTITION_TABLE_WARNING, BrandManager.ProductVersionPost82); break; default: _shortMessage = Messages.NOT_SAFE_TO_UPGRADE_DEFAULT; detail = string.Format(Messages.NOT_SAFE_TO_UPGRADE_DEFAULT_WARNING, BrandManager.ProductVersionPost82); break; } Message = $"{_shortMessage}\n\n{newPartitionInfo}\n\n{detail}"; }
public HostNotSafeToUpgradeWarning(Check check, Host host, HostNotSafeToUpgradeReason reason) : base(check) { this.host = host; this.reason = reason; }