OAT
Object Analysis Toolkit is a C# library for analyzing objects using Rules.
OAT, a rules engine for inspecting C objects
Object Analysis Toolkit is a C# metaprogramming library where rules with targets, severities, and expressions drive analysis of arbitrary C objects, plus an experimental Blazor sandbox to author and test them.
Rules in four parts
Object Analysis Toolkit, OAT for short, describes itself as a rules driven metaprogramming engine for arbitrary C objects. A rule bundles an object target, an int severity, a string boolean expression, and a list of clauses that get applied to the targeted object. Each clause runs a specified operation on a specified field, and a field can be any property, subproperty, or field of the object, something like SomeFieldOfTarget.SomeObject.SomeProperty. Clauses can capture the result of their operation so it comes back with the applied rule.
An experimental browser sandbox
OAT Blazor is a separate, experimental piece: a WebAssembly app that runs in the browser and lets you author rules and test them in a sandbox using objects instantiated from an assembly you provide. It is a way to poke at the rule engine without standing up a full build environment. The README introduces it under the getting started section rather than treating it as the main product.
Extending and contributing
Both the operation set and the object types supported by existing operations can be expanded with delegates, which is how the engine stays open to new kinds of checks. A full walkthrough on the wiki covers creating a custom operation, validating your custom operation rules, and capturing clause values. Contributions run through the usual Microsoft flow: a Contributor License Agreement, a bot that figures out whether one is needed when you open a pull request, and the Microsoft Open Source Code of Conduct.
Community notes