/// <summary> /// Raises the <see cref="E:RuleRenderComplete"/> event. /// </summary> /// <param name="args">The <see cref="Vergosity.Validation.RuleEventArgs"/> instance containing the event data.</param> public virtual void OnRuleRenderComplete(RuleEventArgs args) { EventHandler <RuleEventArgs> handler = OnRuleRendered; if (handler != null) { handler(this, args); } }
/// <summary> /// Called when [rule rendered handler]. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e"> /// The <see cref="RuleEventArgs" /> instance containing the event data. /// </param> private void OnRuleRenderedHandler(object sender, RuleEventArgs e) { if (RenderType == RenderType.ExitOnFirstFalseEvaluation && !e.Rule.IsValid) { exitRuleRendering = true; } if (RenderType == RenderType.ExitOnFirstTrueEvaluation && e.Rule.IsValid) { exitRuleRendering = true; } }
/// <summary> /// Handles the OnRuleRendered event of the rule control. The rule's RenderType will /// determine if the rule set will continue evaluation. This allows for /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="RuleEventArgs" /> instance containing the event data.</param> /// <exception cref="System.NotImplementedException"></exception> void OnRuleRenderedHandler(object sender, RuleEventArgs e) { if(this.RenderType == RenderType.ExitOnFirstFalseEvaluation && !e.Rule.IsValid) { this.exitRuleRendering = true; } if(this.RenderType == RenderType.ExitOnFirstTrueEvaluation && e.Rule.IsValid) { this.exitRuleRendering = true; } }