PnLMessageAdapter

StockSharp.Algo.PnL

The message adapter, automatically calculating profit-loss.

Inherits: MessageAdapterWrapper

Constructors

PnLMessageAdapter
public PnLMessageAdapter(IMessageAdapter innerAdapter, IPnLManager pnlManager)
pnLMessageAdapter = PnLMessageAdapter(innerAdapter, pnlManager)

The message adapter, automatically calculating profit-loss.

innerAdapter
The adapter, to which messages will be directed.
pnlManager
The profit-loss manager.

Methods

Clone
public override IMessageAdapter Clone()
result = pnLMessageAdapter.Clone()

Create a copy of PnLMessageAdapter.

Returns: Copy.

OnInnerAdapterNewOutMessageAsync
protected override ValueTask OnInnerAdapterNewOutMessageAsync(Message message, CancellationToken cancellationToken)
result = pnLMessageAdapter.OnInnerAdapterNewOutMessageAsync(message, cancellationToken)

Process InnerAdapter output message.

message
The message.
cancellationToken
Cancellation token.
OnSendInMessageAsync
protected override ValueTask OnSendInMessageAsync(Message message, CancellationToken cancellationToken)
result = pnLMessageAdapter.OnSendInMessageAsync(message, cancellationToken)

Send message.

message
Message.
cancellationToken
CancellationToken