ValidationContextExtensions.LogViolation Method (ValidationContext, ViolationType, String, String, IElement[])
Display a message of a specified kind in the Visual Studio error list. Generic version of the other Log methods.
Namespace: Microsoft.VisualStudio.ArchitectureTools.Extensibility.Uml
Assembly: Microsoft.VisualStudio.ArchitectureTools.Extensibility (in Microsoft.VisualStudio.ArchitectureTools.Extensibility.dll)
Syntax
public static void LogViolation(
this ValidationContext context,
ViolationType violationType,
string description,
string code,
params IElement[] elements
)
public:
[ExtensionAttribute]
static void LogViolation(
ValidationContext^ context,
ViolationType violationType,
String^ description,
String^ code,
... array<IElement^>^ elements
)
static member LogViolation :
context:ValidationContext *
violationType:ViolationType *
description:string *
code:string *
[<ParamArrayAttribute>] elements:IElement[] -> unit
<ExtensionAttribute>
Public Shared Sub LogViolation (
context As ValidationContext,
violationType As ViolationType,
description As String,
code As String,
ParamArray elements As IElement()
)
Parameters
violationType
Type: Microsoft.VisualStudio.Modeling.Validation.ViolationTypeSpecify whether this is an error, warning, or information.
description
Type: System.StringMessage displayed in the error window.
code
Type: System.StringA unique identifier for this message.
elements
Type: Microsoft.VisualStudio.Uml.Classes.IElement[]Elements that should be selected when the user double-clicks the error message.
See Also
ValidationContextExtensions Class
Microsoft.VisualStudio.ArchitectureTools.Extensibility.Uml Namespace
Return to top