ValidationManager.GetValidators(Type) 方法

定义

通过查找应用于类型的验证程序属性,返回与该类型关联的验证程序的数组。Returns an array of validators that are associated with a type by looking up the validator attribute applied on the type.

public:
 cli::array <System::Workflow::ComponentModel::Compiler::Validator ^> ^ GetValidators(Type ^ type);
public System.Workflow.ComponentModel.Compiler.Validator[] GetValidators (Type type);
member this.GetValidators : Type -> System.Workflow.ComponentModel.Compiler.Validator[]
Public Function GetValidators (type As Type) As Validator()

参数

type
Type

要找的 Type 类的 ValidatorThe Type of Validator class to find.

返回

Validator[]

Validator 类的数组。An array of Validator classes.

注解

如果 Validator 类的哈希表包含由 Type 指示的 type,将返回 Validator 类的数组。If the hash table of Validator classes contains the Type indicated by type, an array of Validator classes is returned.

如果哈希表不包含由 Type 指示的 type,将创建 Validator 类的一个新哈希表,然后返回 Validator 类的数组。If the hash table does not contain the Type indicated by type, a new hash table of Validator classes is created and then an array of the Validator classes is returned.

适用于