Bloomberg API for .NET
Cancel Method (correlators, requestLabel)
NamespacesBloomberglp.BlpapiAbstractSessionCancel(IList<(Of <<'(CorrelationID>)>>), String)
Cancels outstanding requests or subscriptions represented by the specified list of correlationIds.
Declaration Syntax
C#Visual BasicVisual C++
public void Cancel(
	IList<CorrelationID> correlators,
	string requestLabel
)
Public Sub Cancel ( 
	correlators As IList(Of CorrelationID),
	requestLabel As String
)
public:
void Cancel(
	IList<CorrelationID^>^ correlators, 
	String^ requestLabel
)
Parameters
correlators (IList<(Of <(<'CorrelationID>)>)>)
requestLabel (String)
Remarks

Cancels a previous request or subscription for asynchronous topic updates associated with each correlationId specified in the list of correlators. Upon return, no further message will be generated for the request or subscription associated with the specified correlationIds.

NOTE:
1) For asynchronous sessions, a handler may still be processing an existing message for the associated request or subscription after the call returns. That is while iterating over an event, if any message is encountered for a cancelled CorrelationID, it will be silently ignored, but if the message was iterated to just prior to the completion of the cancel request it will be delivered, it is up to the application developer to handle this condition.

2) If any of the specified CorrelationIds do not refer to an "active" request or Subscription then, that particular CorrelationID will be ignored. This behavior is to avoid sporadic failures when unsolicited subscription terminations and request failures are received just prior to an application attempting to explicitly cancel the pending requests or subscriptions.

3) Once this call returns, the specified CorrelationID can be reused for new requests to this session. Also note that application developers should generally be cautions not to reuse a correlation id until all existing references within their applications have been cleared. Depending on the use of the correlation id, this can possibly result in accessing application resources which are no longer available.

Exceptions
ExceptionCondition
InvalidOperationException Session is not started.

Assembly: Bloomberglp.Blpapi (Module: Bloomberglp.Blpapi.dll) Version: 3.7.4.1