This documentation is archived and is not being maintained.
ActivityValidationServices::Validate Method (Activity, ValidationSettings)
Visual Studio 2010
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.
Assembly: System.Activities (in System.Activities.dll)
public: static ValidationResults^ Validate( Activity^ toValidate, ValidationSettings^ settings )
Parameters
- toValidate
- Type: System.Activities::Activity
An activity from a workflow activity tree.
- settings
- Type: System.Activities.Validation::ValidationSettings
An object that determines the behavior of the validation method on the workflow , can suppress the internal validation logic, and can also contain the policy constraints.
Return Value
Type: System.Activities.Validation::ValidationResultsA collection of validation errors, each of which can contain the name of the activity that is configured incorrectly, a descriptive message, an error or warning 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.
- 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.
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: