Condividi tramite


VsValidationController.Validate Method (IEnumerable<ModelElement>, ValidationCategories)

Invoke all the validation methods that are applicable to the set of elements.

Namespace:  Microsoft.VisualStudio.Modeling.Shell
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.Shell.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.Shell.10.0.dll)

Syntax

'Dichiarazione
Public Overrides Function Validate ( _
    subjects As IEnumerable(Of ModelElement), _
    categories As ValidationCategories _
) As Boolean
public override bool Validate(
    IEnumerable<ModelElement> subjects,
    ValidationCategories categories
)
public:
virtual bool Validate(
    IEnumerable<ModelElement^>^ subjects, 
    ValidationCategories categories
) override
abstract Validate : 
        subjects:IEnumerable<ModelElement> * 
        categories:ValidationCategories -> bool 
override Validate : 
        subjects:IEnumerable<ModelElement> * 
        categories:ValidationCategories -> bool 
public override function Validate(
    subjects : IEnumerable<ModelElement>, 
    categories : ValidationCategories
) : boolean

Parameters

Return Value

Type: System.Boolean

Remarks

Validation is performed on each element in the subjects list. For each element, all of its enabled validation methods are called one after another in an indeterminate order. A validation method is a method with a ValidationMethod attribute and a ValidationContext parameter. A validation method is enabled if one of the ValidationCategories specified in its ValidationMethod attribute matches one of those in the categories parameter. Validation methods in the element's own class and all of its base classes are called.//A validation method can log an error or warning message using the Log methods in the validation context.//Validation methods can use the cache methods in the validation context to pass information from one method to another.

.NET Framework Security

See Also

Reference

VsValidationController Class

Validate Overload

Microsoft.VisualStudio.Modeling.Shell Namespace