Edit

Share via


ActivityExecutionContext Class

Definition

Caution

The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*

Represents the execution environment of an Activity. This class cannot be inherited.

public ref class ActivityExecutionContext sealed : IDisposable, IServiceProvider
public sealed class ActivityExecutionContext : IDisposable, IServiceProvider
[System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")]
public sealed class ActivityExecutionContext : IDisposable, IServiceProvider
type ActivityExecutionContext = class
    interface IServiceProvider
    interface IDisposable
[<System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")>]
type ActivityExecutionContext = class
    interface IServiceProvider
    interface IDisposable
Public NotInheritable Class ActivityExecutionContext
Implements IDisposable, IServiceProvider
Inheritance
ActivityExecutionContext
Attributes
Implements

Remarks

Note

This material discusses types and namespaces that are obsolete. For more information, see Deprecated Types in Windows Workflow Foundation 4.5.

Represents the execution environment of an Activity. This class selectively exposes workflow runtime capabilities and services to individual activities. This class cannot be inherited.

For more information, see Understanding the Activity Execution Context.

Fields

CurrentExceptionProperty

Represents an exception that has occurred during the execution of the workflow instance. This property has a value only when an activity is in the faulting state.

Properties

Activity

Gets the Activity that currently executes within this execution context.

ContextGuid

Gets the ContextID of the associated Activity.

ExecutionContextManager

Gets the ActivityExecutionContextManager associated with this instance.

Methods

CancelActivity(Activity)

Called by a composite activity to schedule the cancellation of a child activity. The workflow runtime disallows cancellation of a child activity that is not in the Executing state.

CloseActivity()

Indicates to the workflow runtime that the currently executing activity should transition to the Closed state.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
ExecuteActivity(Activity)

Called by a composite activity to schedule the execution of a child activity. The workflow runtime disallows execution of a child activity that is not in the initialized state.

GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetService(Type)

Returns a service of the specified type.

GetService<T>()

Returns a service provider of the specified Type.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)
TrackData(Object)

Invokes the track method for the associated Activity.

TrackData(String, Object)

Invokes the track method for the associated Activity.

Explicit Interface Implementations

IDisposable.Dispose()

Releases all resources used by the ActivityExecutionContext.

Extension Methods

GetKeyedService<T>(IServiceProvider, Object)

Get service of type T from the IServiceProvider.

GetKeyedServices(IServiceProvider, Type, Object)

Get an enumeration of services of type serviceType from the IServiceProvider.

GetKeyedServices<T>(IServiceProvider, Object)

Get an enumeration of services of type T from the IServiceProvider.

GetRequiredKeyedService(IServiceProvider, Type, Object)

Get service of type serviceType from the IServiceProvider.

GetRequiredKeyedService<T>(IServiceProvider, Object)

Get service of type T from the IServiceProvider.

CreateAsyncScope(IServiceProvider)

Creates a new AsyncServiceScope that can be used to resolve scoped services.

CreateScope(IServiceProvider)

Creates a new IServiceScope that can be used to resolve scoped services.

GetRequiredService(IServiceProvider, Type)

Get service of type serviceType from the IServiceProvider.

GetRequiredService<T>(IServiceProvider)

Get service of type T from the IServiceProvider.

GetService<T>(IServiceProvider)

Get service of type T from the IServiceProvider.

GetServices(IServiceProvider, Type)

Get an enumeration of services of type serviceType from the IServiceProvider.

GetServices<T>(IServiceProvider)

Get an enumeration of services of type T from the IServiceProvider.

GetFakeLogCollector(IServiceProvider)

Gets the object that collects log records sent to the fake logger.

GetFakeRedactionCollector(IServiceProvider)

Gets the fake redactor collector instance from the dependency injection container.

Applies to