This documentation is archived and is not being maintained.

ActivityValidationServices::Validate Method (Activity)

Verifies that a workflow activity is correctly configured according to the validation logic. This logic can be the CacheMetadata(CodeActivityMetadata) 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(CodeActivityMetadata) override. Any exceptions that are thrown from CacheMetadata(CodeActivityMetadata) are not treated as validation errors. These exceptions will escape from the call to Validate and must be handled by the caller.

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: