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
NotificationRuledefinitions grouped in aNotificationMatrixagainst a caller-supplied model instance of any typeT, producing zero or moreNotificationResultvalues, one per distinct rule position (NotificationRuleEngine.CalculateNotifications<T>, OP-CIA-01). - Resolve each rule's evaluation type from string metadata (
TypeName) and dispatch to anint,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
NotificationRuleinstances 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
NotificationResultvalues that pair the evaluated rule with its string output.
Key components¶
NotificationMatrix: configuration DTO groupingNotificationRuleentries 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 aNotificationRulewith its evaluated string value.
Related documentation¶
Note: Statements marked with
**could not be confirmed; treat as unknown until verified.
Sources¶
Services/SAIF.Services.ClaimInfoApi.Core/SAIF.Services.ClaimInfoApi.Core.csprojServices/SAIF.Services.ClaimInfoApi.Core/NotificationMatrix.csServices/SAIF.Services.ClaimInfoApi.Core/NotificationRule.csServices/SAIF.Services.ClaimInfoApi.Core/NotificationRuleEngine.csServices/SAIF.Services.ClaimInfoApi.Core/NotificationRuleResult.cs