ValidationContext.ConstructValidationMessage Method

Constructs a validation message. You can override this method to construct a custom validation message.

Namespace:  Microsoft.VisualStudio.Modeling.Validation
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.11.0 (in Microsoft.VisualStudio.Modeling.Sdk.11.0.dll)

Syntax

'Declaration
Protected Overridable Function ConstructValidationMessage ( _
    description As String, _
    code As String, _
    violationType As ViolationType, _
    ParamArray elements As ModelElement() _
) As ValidationMessage
protected virtual ValidationMessage ConstructValidationMessage(
    string description,
    string code,
    ViolationType violationType,
    params ModelElement[] elements
)
protected:
virtual ValidationMessage^ ConstructValidationMessage(
    String^ description, 
    String^ code, 
    ViolationType violationType, 
    ... array<ModelElement^>^ elements
)
abstract ConstructValidationMessage : 
        description:string * 
        code:string * 
        violationType:ViolationType * 
        elements:ModelElement[] -> ValidationMessage  
override ConstructValidationMessage : 
        description:string * 
        code:string * 
        violationType:ViolationType * 
        elements:ModelElement[] -> ValidationMessage
protected function ConstructValidationMessage(
    description : String, 
    code : String, 
    violationType : ViolationType, 
    ... elements : ModelElement[]
) : ValidationMessage

Parameters

  • description
    Type: String

    The message description.

  • code
    Type: String

    A code that identifies the message.

Return Value

Type: Microsoft.VisualStudio.Modeling.Validation.ValidationMessage
The validation message; otherwise, null, if there is no validation message.

.NET Framework Security

See Also

Reference

ValidationContext Class

Microsoft.VisualStudio.Modeling.Validation Namespace