/// <summary>Update the <see cref="Value"/> with the given tokens.</summary> /// <param name="context">The condition context.</param> /// <returns>Returns whether the value changed.</returns> public bool UpdateContext(ConditionContext context) { string prevValue = this.Value; this.Value = this.Apply(this.Raw, context.Values); return(this.Value != prevValue); }
/// <summary>Whether the condition matches.</summary> /// <param name="context">The condition context.</param> public bool IsMatch(ConditionContext context) { foreach (string conditionValue in context.GetValues(this.Key)) { if (this.Values.Contains(conditionValue)) { return(true); } } return(false); }
/// <summary>Whether the condition matches.</summary> /// <param name="context">The condition context.</param> public bool IsMatch(ConditionContext context) { return(context .GetValues(this.Key) .Any(p => this.Values.Contains(p))); }
/// <summary>Whether the condition matches.</summary> /// <param name="context">The condition context.</param> public bool IsMatch(ConditionContext context) { string contextValue = context.GetValue(this.Key); return(this.Values.Contains(contextValue)); }