Skip to content

SAIF.Services.ClaimInfoApi.Core overview

Documentation context: Packaged Component (NuGet)

SAIF.Services.ClaimInfoApi.Core is a small, self-contained .NET Framework 4.6.2 class library that implements a metadata-driven notification rule engine, evaluating caller-supplied NotificationRule definitions against an arbitrary model type at run time by compiling LINQ expression trees on demand, with no I/O, persistence, configuration, logging, or security code of its own.

Purpose

  • Evaluate a set of NotificationRule definitions grouped in a NotificationMatrix against a caller-supplied model instance of any type T, producing zero or more NotificationResult values, one per distinct rule position (NotificationRuleEngine.CalculateNotifications<T>, OP-CIA-01).
  • Resolve each rule's evaluation type from string metadata (TypeName) and dispatch to an int, bool, or string evaluation path, including recursive out-property resolution for conditional rules (OP-CIA-02).
  • Compile a rule's member name, operator name, and target value into a LINQ expression tree and a runnable delegate on every invocation (OP-CIA-03).
  • Provide the only supported construction path for NotificationRule instances through four static factory methods, since the type's constructor is private (OP-CIA-04).
  • Consumers supply both the model and the rule matrix; this library performs no data access or configuration lookup of its own — the source of a populated NotificationMatrix (for example an OnBase notification-matrix store) is not visible from this library**.

Responsibilities

  • Hold and expose rule metadata (NotificationMatrix, NotificationRule) as plain configuration DTOs.
  • Compile and execute rule expressions against an arbitrary model type using reflection and System.Linq.Expressions.
  • Produce NotificationResult values that pair the evaluated rule with its string output.

Key components

  • NotificationMatrix: configuration DTO grouping NotificationRule entries under a composite "{DocType}:{SubType}" key.
  • NotificationRule: an immutable-by-construction rule definition, created only through its static factories.
  • NotificationRuleEngine: the static evaluation and expression-compilation engine; holds no instance state.
  • NotificationResult: a DTO pairing a NotificationRule with its evaluated string value.

Note: Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • Services/SAIF.Services.ClaimInfoApi.Core/SAIF.Services.ClaimInfoApi.Core.csproj
  • Services/SAIF.Services.ClaimInfoApi.Core/NotificationMatrix.cs
  • Services/SAIF.Services.ClaimInfoApi.Core/NotificationRule.cs
  • Services/SAIF.Services.ClaimInfoApi.Core/NotificationRuleEngine.cs
  • Services/SAIF.Services.ClaimInfoApi.Core/NotificationRuleResult.cs