Class AsyncMessageChannel
- Namespace
- StockSharp.Messages
- Assembly
- StockSharp.Messages.dll
Async message channel that processes messages via NewOutMessageAsync.
public class AsyncMessageChannel : Disposable, IMessageChannel, IMessageTransport, IDisposable, ICloneable<IMessageChannel>, ICloneable
- Inheritance
-
AsyncMessageChannel
- Implements
- Inherited Members
- Extension Methods
Remarks
Initializes a new instance of the AsyncMessageChannel.
Constructors
AsyncMessageChannel(IMessageAdapter)
Async message channel that processes messages via NewOutMessageAsync.
public AsyncMessageChannel(IMessageAdapter adapter)
Parameters
adapterIMessageAdapter
Remarks
Initializes a new instance of the AsyncMessageChannel.
Properties
State
State.
public ChannelStates State { get; }
Property Value
Methods
Clear()
Clear.
public void Clear()
Clone()
Creates a new object that is a deep copy of the current instance.
public IMessageChannel Clone()
Returns
- IMessageChannel
A new object that is a deep copy of this instance.
Close()
Close channel.
public void Close()
DisposeManaged()
Disposes the managed resources. Override this method to add custom clean up of managed resources.
protected override void DisposeManaged()
Open()
Open channel.
public void Open()
Resume()
Resume.
public void Resume()
SendInMessageAsync(Message, CancellationToken)
Processes a generic message asynchronously.
public ValueTask SendInMessageAsync(Message message, CancellationToken cancellationToken)
Parameters
messageMessageThe message to process.
cancellationTokenCancellationToken
Returns
Suspend()
Suspend.
public void Suspend()
Events
NewOutMessageAsync
New message event.
public event Func<Message, CancellationToken, ValueTask> NewOutMessageAsync
Event Type
StateChanged
State change event.
public event Action StateChanged