Skip to content

NotificationResult

NotificationResult is the output DTO of NotificationRuleEngine: it pairs the source NotificationRule that produced a value with that evaluated string value, giving a caller both the result and full traceability back to the rule that generated it. It is defined in NotificationRuleResult.cs, a source file name that does not match the class it defines*.

Purpose

  • Carry one evaluated notification value alongside a reference to the NotificationRule that produced it, so a caller of NotificationRuleEngine.CalculateNotifications<T> can attribute each result to its originating rule (OP-CIA-01).

Context

  • Namespace: SAIF.Services.ClaimInfoApi.Core
  • Assembly/package: SAIF.Services.ClaimInfoApi.Core.dll, packaged inside the SAIF.SAIFCode.Core NuGet package

Public members

Member Signature Purpose
Rule public NotificationRule Rule { get; set; } The NotificationRule that produced this result; provides traceability from a notification value back to the rule that generated it.
Value public string Value { get; set; } The evaluated non-null string output of Rule for the model that was passed to NotificationRuleEngine.CalculateNotifications<T>.
NotificationResult(rule, value) public NotificationResult(NotificationRule rule, string value) Constructs a result pairing, used by NotificationRuleEngine.CalculateNotifications<T> for every rule whose evaluated value is non-null (CIA-BR-007).

Behavioral notes

  • NotificationRuleEngine.CalculateNotifications<T> only ever constructs a NotificationResult for a non-null evaluated value; a rule that evaluates to null is skipped entirely and never produces an instance of this type (CIA-BR-007).
  • Rule and Value are both publicly settable, so a NotificationResult obtained from the engine can be mutated by any caller after construction*.

Constraints and usage notes

  • The class name NotificationResult does not match its containing file NotificationRuleResult.cs, which can make the type harder to locate by file name alone*.

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.

Sources

  • Services/SAIF.Services.ClaimInfoApi.Core/NotificationRuleResult.cs