Export (0) Print
Expand All

ValidationContext.LogViolation Method

Creates a validation error, message, or warning.

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

public ValidationMessage LogViolation(
	ViolationType violationType,
	string description,
	string code,
	params ModelElement[] elements
)

Parameters

violationType
Type: Microsoft.VisualStudio.Modeling.Validation.ViolationType

The type of violation.

description
Type: System.String

A description of the violation.

code
Type: System.String

The code for the violation.

elements
Type: Microsoft.VisualStudio.Modeling.ModelElement[]

The model elements that caused the violation.

Return Value

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

Show:
© 2015 Microsoft