百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
O

OAT

> 编程语言
开源

Object Analysis Toolkit 是一款使用规则分析对象的 C# 库。

100 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

Object Analysis Toolkit 是一款使用规则分析对象的 C# 库。

Object Analysis Toolkit

Object Analysis Toolkit (OAT) is a rules driven metaprogramming engine for arbitrary C# objects.

Getting OAT

OAT is available as a library on NuGet as Microsoft.CST.OAT.

To enable using C# scripts in rules you also need Microsoft.CST.OAT.Scripting.

OAT Blazor is an experimental WebAssembly app that runs in your browser and allows you to Author Rules and test them in a Sandbox using Objects instantiated from your provided Assembly.

Documentation

Documentation for usage is on the Wiki.

Documentation for the API is available on GitHub Pages

Overview

  • Rules contain a object Target, an int Severity, a string boolean Expression and a List of Clauses which are applied to the targeted object.
  • Clauses perform a specified Operation on a specified Field of the Target. The Field can be any property or subproperty or field of the object. For example, SomeFieldOfTarget.SomeObject.SomeProperty.
  • Clauses can also Capture the result of their operation, to be returned with the applied Rule.
  • The Operation set can be expanded with delegates.
  • The object types supported by existing operations can also be expanded with delegates.

Basic Usage

The basic usage of OAT is applying rules to targets using the Analyze function.

csharp
object target;
IEnumerable rules;
var analyzer = new Analyzer();
var rulesWhichApply = analyzer.Analyze(rules,target);

Capturing

OAT also supports capturing and returning results of clauses.

csharp
object target;
IEnumerable rules;
var analyzer = new Analyzer();
var res = analyzer.GetCaptures(rules, target);

Detailed Usage

A full walkthrough including creating a custom operation and validating your custom operation rules and capturing Clause values is available on the wiki.

Authoring Rules

Detailed information on how to author rules is available on on the wiki.

Delegates

Documentation for implementing each delegate is available on the wiki.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Privacy

Usage of this application is governed by the Microsoft Privacy Statement.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C#

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言