This section focuses on the use of cancellationscope in exceptions and the use of cancellationscope in parallel.
This example downloads:
Http://files.cnblogs.com/foundation/CancellationScopeSample.rar
This example illustrates
Cancellationscope Cancel Container
| Class name |
System.Activities.Statements.CancellationScope |
| File |
System.Activities.dll |
| Structure description |
Inherit nativeactivity
is a sealed class
Override [CacheMetadata method] and [Execute method] and [Cancel method]
The type of the [body] property is [activity]
The [Cancellationhandler] property is of type [activity]
The [Variables] property is of type [Collection<variable>] |
| Function description |
You can define variables in [Cancellationscope]
[Cancellationscope] consists of [body] and [Cancelhandler] two parts, [body] for the normal execution path, if cancel execution will call the contents of [Cancelhandler]
|