Freigeben über


ValidationController.CreateValidationContext Method (IEnumerable<ModelElement>, array<String )

Create a context for validation of a collection of model elements. Every validation method that belongs to any of the specified custom categories will be applied to every element in the subjects list.

Namespace:  Microsoft.VisualStudio.Modeling.Validation
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.12.0.dll)

Syntax

'Declaration
Protected Overridable Function CreateValidationContext ( _
    subjects As IEnumerable(Of ModelElement), _
    customCategories As String() _
) As ValidationContext
protected virtual ValidationContext CreateValidationContext(
    IEnumerable<ModelElement> subjects,
    string[] customCategories
)
protected:
virtual ValidationContext^ CreateValidationContext(
    IEnumerable<ModelElement^>^ subjects, 
    array<String^>^ customCategories
)
abstract CreateValidationContext : 
        subjects:IEnumerable<ModelElement> * 
        customCategories:string[] -> ValidationContext  
override CreateValidationContext : 
        subjects:IEnumerable<ModelElement> * 
        customCategories:string[] -> ValidationContext
protected function CreateValidationContext(
    subjects : IEnumerable<ModelElement>, 
    customCategories : String[]
) : ValidationContext

Parameters

  • customCategories
    Type: array<System.String[]

    A validation method will be applied if it has a ValidationMethod attribute that specifies one of the custom categories in this collection.

Return Value

Type: Microsoft.VisualStudio.Modeling.Validation.ValidationContext

.NET Framework Security

See Also

Reference

ValidationController Class

CreateValidationContext Overload

Microsoft.VisualStudio.Modeling.Validation Namespace