Lean  $LEAN_TAG$
QuantConnect.Brokerages.BrokerageConcurrentMessageHandler< T > Class Template Reference

Brokerage helper class to lock message stream while executing an action, for example placing an order More...

Public Member Functions

 BrokerageConcurrentMessageHandler (Action< T > processMessages)
 Creates a new instance More...
 
void HandleNewMessage (T message)
 Will process or enqueue a message for later processing it More...
 
void WithLockedStream (Action code)
 Lock the streaming processing while we're sending orders as sometimes they fill before the call returns. More...
 

Detailed Description

Brokerage helper class to lock message stream while executing an action, for example placing an order

Type Constraints
T :class 

Definition at line 26 of file BrokerageConcurrentMessageHandler.cs.

Constructor & Destructor Documentation

◆ BrokerageConcurrentMessageHandler()

Creates a new instance

Parameters
processMessagesThe action to call for each new message

Definition at line 36 of file BrokerageConcurrentMessageHandler.cs.

Member Function Documentation

◆ HandleNewMessage()

void QuantConnect.Brokerages.BrokerageConcurrentMessageHandler< T >.HandleNewMessage ( message)

Will process or enqueue a message for later processing it

Parameters
messageThe new message

Definition at line 47 of file BrokerageConcurrentMessageHandler.cs.

◆ WithLockedStream()

void QuantConnect.Brokerages.BrokerageConcurrentMessageHandler< T >.WithLockedStream ( Action  code)

Lock the streaming processing while we're sending orders as sometimes they fill before the call returns.

Definition at line 77 of file BrokerageConcurrentMessageHandler.cs.


The documentation for this class was generated from the following file: