C-Objects
收藏资源简介:
比较复杂的对象是很常见的情况。有时对象可以包含嵌套元素,或者一些成员应该从比较中排除 (自动生成的标识符,创建/更新日期等),或者一些成员可以有自定义的比较规则 (不同格式的相同数据,如电话号码)。这个小框架是为了解决这类问题而开发的。 简而言之,对象比较器是一个对象到对象比较器,它允许按成员递归地比较对象,并为某些属性、字段或类型定义自定义比较规则。 对象比较器可以被视为可以使用框架或作为类似解决方案的起点。
Highly complex objects are a common occurrence. Sometimes, objects may contain nested elements, some members need to be excluded from comparison (e.g., auto-generated identifiers, creation/update timestamps, etc.), or certain members may have custom comparison rules (e.g., identical data stored in different formats such as phone numbers). This lightweight framework was developed to address these types of issues. In short, an object comparator is an object-to-object comparison tool that enables recursive comparison of objects based on their members, and allows defining custom comparison rules for specific attributes, fields, or data types. This object comparator can either be utilized within the framework or serve as a starting point for analogous solutions.




