Microsoft.VisualStudio.Modeling.Validation Namespace


The Microsoft.VisualStudio.Modeling.Validation namespace provides classes that you can use to check a model for valid data and consistency between its elements. Validation is integrated into Visual Studio so that errors, warnings, and messages detected during validation appear in the Error List window.


Contains information about the current validation processing being performed.


Contains logic to validate a single model element or all model elements in a store or partition.


Represents a validation message that states an error, a warning, or a message.


Reports errors, messages, and warnings that are generated from validation methods.


Apply this attribute to methods that should be invoked during validation.


Apply this attribute to a model element class to control whether its instances are included in validation operations. By default, a model element is validated only if validation is explicitly enabled for a class to which it belongs, using this attribute.


This enumeration is a parameter for the constructor of the custom attribute, ValidationMethodAttribute. It specifies the type of validation in which the rule will be invoked.


Identifies whether instances of a class will be enabled for validation.


Represents the type of violation that has occurred during validation.

You can specify that validation occurs when the user opens a model, saves a model, or clicks a validation option from a shortcut menu. You can also invoke validation from program code, for example as part of an event handler or menu command.

For more information, see Validation in a Domain-Specific Language.

Return to top