Condividi tramite


ValidationContext.LogViolation Method

Creates a validation error, message, or warning.

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

Syntax

'Dichiarazione
Public Function LogViolation ( _
    violationType As ViolationType, _
    description As String, _
    code As String, _
    ParamArray elements As ModelElement() _
) As ValidationMessage
public ValidationMessage LogViolation(
    ViolationType violationType,
    string description,
    string code,
    params ModelElement[] elements
)
public:
ValidationMessage^ LogViolation(
    ViolationType violationType, 
    String^ description, 
    String^ code, 
    ... array<ModelElement^>^ elements
)
member LogViolation : 
        violationType:ViolationType * 
        description:string * 
        code:string * 
        elements:ModelElement[] -> ValidationMessage 
public function LogViolation(
    violationType : ViolationType, 
    description : String, 
    code : String, 
    ... elements : ModelElement[]
) : ValidationMessage

Parameters

  • description
    Type: System.String
    A description of the violation.

Return Value

Type: Microsoft.VisualStudio.Modeling.Validation.ValidationMessage
The validation error, message, or warning.

.NET Framework Security

See Also

Reference

ValidationContext Class

Microsoft.VisualStudio.Modeling.Validation Namespace