调用适用于此元素集所有的验证方法。
命名空间: Microsoft.VisualStudio.Modeling.Shell
程序集: Microsoft.VisualStudio.Modeling.Sdk.Shell.12.0(在 Microsoft.VisualStudio.Modeling.Sdk.Shell.12.0.dll 中)
语法
声明
Public Overrides Function Validate ( _
subjects As IEnumerable(Of ModelElement), _
categories As ValidationCategories _
) As Boolean
public override bool Validate(
IEnumerable<ModelElement> subjects,
ValidationCategories categories
)
参数
- subjects
类型:System.Collections.Generic.IEnumerable<ModelElement>
要验证的元素的列表。
- categories
类型:Microsoft.VisualStudio.Modeling.Validation.ValidationCategories
确定一组要执行的验证方法。
返回值
备注
验证对每个元素运行在用户列表。 对于每个元素,其所有启用验证方法处于不确定的顺序依次调用。 验证方法与 ValidationMethod 特性和 ValidationContext 参数的方法。 则在其 ValidationMethod 特性指定一个 ValidationCategories 与之一个类别,参数验证方法。 在元素自己的类和所有的验证方法其基类调用。//A 验证方法能记录错误或使用记录方法的警告消息。验证上下文。//Validation 方法可以在验证上下文使用缓存方法传送到来自方法的信息。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。