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)
Syntax
'Declaration
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
violationType
Type: Microsoft.VisualStudio.Modeling.Validation.ViolationTypeThe type of violation.
description
Type: System.StringA description of the violation.
code
Type: System.StringThe 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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.