System.Workflow.Activities ...


.NET Framework Class Library
CodeActivity Class

Runs the code-beside method associated with an activity. This class cannot be inherited.

Namespace:  System.Workflow.Activities
Assembly:  System.Workflow.Activities (in System.Workflow.Activities.dll)
Syntax

Visual Basic (Declaration)
<ToolboxBitmapAttribute(GetType(CodeActivity), "Resources.code.png")> _
Public NotInheritable Class CodeActivity _
    Inherits Activity
Visual Basic (Usage)
Dim instance As CodeActivity
C#
[ToolboxBitmapAttribute(typeof(CodeActivity), "Resources.code.png")]
public sealed class CodeActivity : Activity
Visual C++
[ToolboxBitmapAttribute(typeof(CodeActivity), L"Resources.code.png")]
public ref class CodeActivity sealed : public Activity
JScript
public final class CodeActivity extends Activity
Remarks

Code-beside methods invoked by CodeActivity are executed in a synchronous manner; CodeActivity does not yield its thread until the thread is finished. Therefore, the execution of the code-beside method is expected to be performed and should not block with a dependency on some external resource. For example, the code-beside method should typically not invoke a Web service.

The typical use of the CodeActivity is to examine workflow instance state, and change local variables and messages.

Inheritance Hierarchy

System..::.Object
  System.Workflow.ComponentModel..::.DependencyObject
    System.Workflow.ComponentModel..::.Activity
      System.Workflow.Activities..::.CodeActivity
Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information

.NET Framework

Supported in: 3.5, 3.0
See Also

Reference

Other Resources

Tags :


Page view tracker