If a new primary use is anticipated for a component, consider whether this creates a new trust boundary and a need for additional validity checking outside the component.
如果希望组件提供新的主要用途,请考虑这是否会创建新的信任边界和带来在组件外进行额外有效性检查的需求。
With code generation, you can also build validation into the constructed classes, either automatically checking values when they are set or checking validity on demand.
用代码生成,您还可以将验证构建进所构造的类中,从而要么自动检查值(当设置好它们时),要么按照需要检查有效性。
Considering the primary USES of components within application structures leads to more appropriate placement of data validity checking — for example, only at managed trust boundaries.
通过考虑组件在应用程序结构内的主要使用情况,可以更为恰当地确定数据有效性检查的位置——例如,仅在受管理的信任边界进行检查。
应用推荐