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.

System_CAPS_cautionCaution

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
Available since 1.1
Return to top
Show: