This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1 | |
using Sitecore.Framework.Rules; | |
namespace MiTienda.Commerce.Plugin.Custom.Conditions | |
{ | |
// 2 | |
[EntityIdentifier("¿El número [especificado] es impar?")] | |
// 3 | |
public class NumeroEsImparCondition : ICondition | |
{ | |
// 4 | |
public IRuleValue<int> Numero { get; set; } | |
// 5 | |
public bool Evaluate(IRuleExecutionContext context) | |
{ | |
// 6 | |
return Numero.Yield(context) % 2 != 0; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment