Class InMemoryMessageChannel
- Namespace
- StockSharp.Messages
- Assembly
- StockSharp.Messages.dll
Message channel, based on the queue and operate within a single process.
public class InMemoryMessageChannel : Disposable, IMessageChannel, IMessageTransport, IDisposable, ICloneable<IMessageChannel>, ICloneable
- Inheritance
-
InMemoryMessageChannel
- Implements
- Inherited Members
- Extension Methods
Constructors
InMemoryMessageChannel(IMessageQueue, string, Action<Exception>)
Initializes a new instance of the InMemoryMessageChannel.
public InMemoryMessageChannel(IMessageQueue queue, string name, Action<Exception> errorHandler)
Parameters
queueIMessageQueueMessage queue.
namestringChannel name.
errorHandlerAction<Exception>Error handler.
Properties
Disabled
The channel cannot be opened.
public bool Disabled { get; set; }
Property Value
MessageCount
Message queue count.
public int MessageCount { get; }
Property Value
Name
Handler name.
public string Name { get; }
Property Value
State
State.
public ChannelStates State { get; }
Property Value
Methods
Clone()
Creates a new object that is a deep copy of the current instance.
public virtual 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()
Events
NewOutMessageAsync
New message event.
public event Func<Message, CancellationToken, ValueTask> NewOutMessageAsync
Event Type
StateChanged
State change event.
public event Action StateChanged