使用一个上下文、一个标题、一代码和冲突类型消息的, ValidationMessage 初始化类的新实例。
命名空间: Microsoft.VisualStudio.Modeling.Validation
程序集: Microsoft.VisualStudio.Modeling.Sdk.11.0(在 Microsoft.VisualStudio.Modeling.Sdk.11.0.dll 中)
语法
声明
Protected Friend Sub New ( _
context As ValidationContext, _
description As String, _
code As String, _
type As ViolationType _
)
protected internal ValidationMessage(
ValidationContext context,
string description,
string code,
ViolationType type
)
参数
- context
类型:Microsoft.VisualStudio.Modeling.Validation.ValidationContext
ValidationMessage 的验证上下文。
- description
类型:System.String
问题的说明。此文本将显示在 Visual Studio " 输出 " 窗口。
- code
类型:System.String
消息的标识符。
- type
类型:Microsoft.VisualStudio.Modeling.Validation.ViolationType
ValidationMessage (错误、警告或消息) 的类型。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。