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.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.10.0.dll)
Syntax
'Declaración
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
- subjects
Type: System.Collections.Generic.IEnumerable<ModelElement>
The model elements to which validation methods will be applied.
- 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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.