Files
Store.Management/.agents/skills/max-common/references/features.md
T
2026-10-27 19:01:56 +08:00

27 lines
3.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 功能索引
参考版本:MAX.Common 1.4.17。以下命名空间均以 `MAX.Common` 为根。按任务读取对应 API 声明,避免把相似名称当作相同语义。
| 需求 | 命名空间 / 入口 | 选择提示 |
| --- | --- | --- |
| 同步、异步 ICommand | Commands:MethodCommand、AsyncMethodCommand,均有泛型版本 | 不依赖 WPF 控件;泛型参数有可空约束 |
| 属性变化通知 | Models:BindModelBase、BindableBaseEx、BindObject | 依调用方需要选字段模型或属性包,不强行更换现有 MVVM 框架 |
| 枚举描述与展示元数据 | Models.EnumItem、Attributes.EnumDisplayAttribute、TooltipAttribute;Helpers.EnumHelper;Utilities.EnumDisplayManagerBase | 先看元数据读取方式;WPF 显示由 WPF 包处理 |
| 双向映射、列表字典 | Data.Collections:BidirectionalDictionary、ListDictionary | 双向字典提供 TryGetKey / TryGetValue;重复值等规则核对当前实现 |
| 循环、反转、投影与区间读取 | Data.Lists:CyclicReadOnlyList、ReversedReadonlyList、SelectorReadonlyList、RangeDataReadList、ExtendReadonlyList、ObjectReadonlyList | 只读接口不等于独立不可变副本,检查是否持有源集合与索引边界 |
| 二维数据与表格 | Data.Arrays.ReadonlyMatrix、Data.Tables.ListTable;Interfaces.IReadonlyMatrix、IDataTable;Helpers.CollectionHelper 的 Matrix 部分 | 确认行列顺序和维度,避免与 UI DataGrid 混淆 |
| 数值与精度 | Helpers.NumberHelper;Data.PrecisionBuilder;Models.Range、Helpers.RangeHelper | 检查上下限、转换和舍入行为,勿猜测精度单位 |
| 二维向量 | Data:Vector2、Vector2F、Vector2Int、Vector2Mutable;Interfaces.IVector2 | 按数值类型与可变性选择;WPF Point 转换在 WPF 包 |
| 集合操作 | Helpers.CollectionHelper 的 Array / Collection / Enumerable / List 部分、DictionaryHelper;Models.ObservableHashSet | 按具体签名区分原地修改和返回新集合 |
| 文件、目录、大小显示 | Helpers.FileHelper、DirectoryHelper;Comparers.FilePathStringComparer | `long.FileSizeToString()` 自动显示大小;删除、复制等操作先确认覆盖和异常语义 |
| 路径、文件夹名校验 | Utilities.PathValidator、FolderNameValidator | 文件夹名单段校验和完整路径校验分开使用;不提供目录访问授权 |
| 字符串、日期、随机数、GUID | Helpers.StringHelper、DateTimeHelper、RandomHelper、GuidHelper | 沿用现有文化、格式和业务随机性要求 |
| 类型、反射、属性与赋值 | Helpers.TypeHelper、ReflectionHelper、AttributeHelper、StructHelper;Utilities.AssignUtility;Attributes.AssignableAttribute;Interfaces.IAssignable | 先查反射范围及标记规则,不把赋值当作任意对象深克隆 |
| 强类型与异步事件 | Events.TypedEvent、AsyncEvent;Events.Args;根命名空间 TypedEventHandler | 区分同步通知和串行 Task 回调,处理订阅生命周期 |
| 次数限制、清理与定时 | Utilities.RunLimiter、DisposeAction、CompensatingTimer | RunLimiter 是总次数;DisposeAction 可用于 using 作用域清理;定时器按实际 API 管理生命周期 |
| 编码与摘要 | Cryptography.Base64Helper、UriHelper、MD5Helper | 用于已有编码和摘要需求;不将编码当作加密 |
| 进程与运行环境 | Helpers.ProcessHelper、ArchitectureChecker、GCHelper | netstandard 目标不保证具体系统 API 跨平台可用 |
| 版本与颜色数据 | Models.VersionStruct、SimpleColor | WPF Color / Brush 转换需 WPF 包 |
其他支撑类型可在安装包 XML 文档或源码按上述命名空间搜索。这里是能力路由,不承诺未列明的签名与行为。