Class InMemoryMessageChannel
- Namespace
- StockSharp.Messages
- Assembly
- StockSharp.Messages.dll
Message channel, based on the queue and operate within a single process.
public class InMemoryMessageChannel : IMessageChannel, IDisposable, ICloneable<IMessageChannel>, ICloneable
- Inheritance
-
InMemoryMessageChannel
- Implements
-
ICloneable<IMessageChannel>
- 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
queue
IMessageQueueMessage queue.
name
stringChannel name.
errorHandler
Action<Exception>Error handler.
Properties
Disabled
The channel cannot be opened.
public bool Disabled { get; set; }
Property Value
MaxMessageCount
Max message queue count.
public int MaxMessageCount { get; set; }
Property Value
Remarks
The default value is -1, which corresponds to the size without limitations.
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()
Create a copy of InMemoryMessageChannel.
public virtual IMessageChannel Clone()
Returns
- IMessageChannel
Copy.
Close()
Close channel.
public void Close()
Open()
Open channel.
public void Open()
SendInMessage(Message)
Send message.
public bool SendInMessage(Message message)
Parameters
message
MessageMessage.
Returns
Events
NewOutMessage
New message event.
public event Action<Message> NewOutMessage
Event Type
StateChanged
State change event.
public event Action StateChanged