public override void Verify() { int licenseServerRows = RowsToVerify.Where(r => r.CanUseLicenseServer).ToList().Count; if (licenseServerRows < 2 && licenseServerRows > 0 && licenseServerRows == RowsToVerify.Count) { Status = VerificationStatus.OK; return; } Status = VerificationStatus.Error; }
public override void Verify() { if (RowsToVerify.Count < 1) { Status = VerificationStatus.Error; return; } bool allCanUseServer = RowsToVerify.TrueForAll(r => r.CanUseLicenseServer); int cannotUse = RowsToVerify.Where(r => !r.CanUseLicenseServer).ToList().Count; bool oldSelectionValid = cannotUse < 2 && cannotUse > 0 && cannotUse == RowsToVerify.Count; if (allCanUseServer || oldSelectionValid) { Status = VerificationStatus.OK; return; } Status = VerificationStatus.Error; }