创建模型元素集合的验证上下文。 属于任一指定自定义类别的验证方法将会应用到主题列表的每一元素。
命名空间: Microsoft.VisualStudio.Modeling.Validation
程序集: Microsoft.VisualStudio.Modeling.Sdk.12.0(在 Microsoft.VisualStudio.Modeling.Sdk.12.0.dll 中)
语法
声明
Protected Overridable Function CreateValidationContext ( _
subjects As IEnumerable(Of ModelElement), _
customCategories As String() _
) As ValidationContext
protected virtual ValidationContext CreateValidationContext(
IEnumerable<ModelElement> subjects,
string[] customCategories
)
参数
- subjects
类型:System.Collections.Generic.IEnumerable<ModelElement>
验证方法将应用的模型元素。
- customCategories
类型:array<System.String[]
如果其具有此集合中指定的一种自定义类别的 ValidationMethod 特性,则验证方法将适用。
返回值
类型:Microsoft.VisualStudio.Modeling.Validation.ValidationContext
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。