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.

ClassDescription
System_CAPS_pubclassValidationContext

Contains information about the current validation processing being performed.

System_CAPS_pubclassValidationController

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

System_CAPS_pubclassValidationMessage

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

System_CAPS_pubclassValidationMessageObserver

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

System_CAPS_pubclassValidationMethodAttribute

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

System_CAPS_pubclassValidationStateAttribute

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.

EnumerationDescription
System_CAPS_pubenumValidationCategories

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.

System_CAPS_pubenumValidationState

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

System_CAPS_pubenumViolationType

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
Show: