共用方式為


Validator.ValidateProperty 方法

定義

執行屬性驗證,並傳回包含驗證結果的 ValidationErrorCollection

protected public:
 System::Workflow::ComponentModel::Compiler::ValidationErrorCollection ^ ValidateProperty(System::Reflection::PropertyInfo ^ propertyInfo, System::Object ^ propertyOwner, System::Object ^ propertyValue, System::Workflow::ComponentModel::Compiler::ValidationManager ^ manager);
protected internal System.Workflow.ComponentModel.Compiler.ValidationErrorCollection ValidateProperty (System.Reflection.PropertyInfo propertyInfo, object propertyOwner, object propertyValue, System.Workflow.ComponentModel.Compiler.ValidationManager manager);
member this.ValidateProperty : System.Reflection.PropertyInfo * obj * obj * System.Workflow.ComponentModel.Compiler.ValidationManager -> System.Workflow.ComponentModel.Compiler.ValidationErrorCollection
Protected Friend Function ValidateProperty (propertyInfo As PropertyInfo, propertyOwner As Object, propertyValue As Object, manager As ValidationManager) As ValidationErrorCollection

參數

propertyInfo
PropertyInfo

Subject 屬性上的 PropertyInfo

propertyOwner
Object

屬性的擁有人。

propertyValue
Object

屬性的值。

manager
ValidationManager

這個作業的 ValidationManager

傳回

ValidationErrorCollection,包含該驗證的結果。

備註

如果驗證未導致任何錯誤,則傳回空的 ValidationErrorCollection

適用於