Share via


ValidationContext.LogViolation Method

Definition

Create a new validation error, message or warning based on passed in violationType enum value. The validation message into the collection maintained by the validation context

public:
 Microsoft::VisualStudio::Modeling::Validation::ValidationMessage ^ LogViolation(Microsoft::VisualStudio::Modeling::Validation::ViolationType violationType, System::String ^ description, System::String ^ code, ... cli::array <Microsoft::VisualStudio::Modeling::ModelElement ^> ^ elements);
public Microsoft.VisualStudio.Modeling.Validation.ValidationMessage LogViolation (Microsoft.VisualStudio.Modeling.Validation.ViolationType violationType, string description, string code, params Microsoft.VisualStudio.Modeling.ModelElement[] elements);
member this.LogViolation : Microsoft.VisualStudio.Modeling.Validation.ViolationType * string * string * Microsoft.VisualStudio.Modeling.ModelElement[] -> Microsoft.VisualStudio.Modeling.Validation.ValidationMessage
Public Function LogViolation (violationType As ViolationType, description As String, code As String, ParamArray elements As ModelElement()) As ValidationMessage

Parameters

violationType
ViolationType
description
String
code
String
elements
ModelElement[]

Returns

Applies to