ValidationMessage 建構函式 (ValidationContext, String, String, ViolationType)
初始化新類別的執行個體 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 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。