Export (0) Print
Expand All

IServiceCall.OnCall Method

Starts the execution of the batch work implemented in this method.

Namespace:  System.EnterpriseServices
Assembly:  System.EnterpriseServices (in System.EnterpriseServices.dll)

void OnCall()

The batch work that is run in this method runs in the context and thread apartment of the activity created by the call to Activity. The batch work in this method is run by a call to either Activity.SynchronousCall or Activity.AsynchronousCall.

Caution noteCaution

You must ensure that this method is thread safe in situations where the activity object created by Activity is not created with a synchronized context, because in such situations many calls to OnCall can run at the same time.

To achieve the best performance from the system, the context configuration of the activity created by Activity should be matched to the batch work performed by the OnCall method. For example, if the batch work in the OnCall method uses poolable objects, the activity created by Activity should be configured to use the multithreaded apartment (MTA).

For information about poolable objects, see the topic "Requirements for Poolable Objects" in the Platform SDK in MSDN.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Show:
© 2014 Microsoft