ValidationContext::LogViolation Method (ViolationType, String^, String^, array<ModelElement^>^)

 

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,
	... array<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: array<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.

Return to top
Show: