ActivityValidationServices::Validate Method (Activity^)

.NET Framework (current version)
 

Verifies that a workflow activity is correctly configured according to the validation logic. This logic can be the CacheMetadata method of the activities to validate, or build and policy constraints.

Namespace:   System.Activities.Validation
Assembly:  System.Activities (in System.Activities.dll)

public:
static ValidationResults^ Validate(
	Activity^ toValidate
)

Parameters

toValidate
Type: System.Activities::Activity^

An element from a workflow activity tree.

Return Value

Type: System.Activities.Validation::ValidationResults^

A collection of validation errors, each of which can contain the name of the validated activity, a descriptive message, an error code, and other information.

Custom activity authors can provide validation logic in an activity's CacheMetadata override. Any exceptions that are thrown from CacheMetadata are not treated as validation errors. These exceptions will escape from the call to Validate and must be handled by the caller.

.NET Framework
Available since 4.0
Return to top
Show: