InMemoryMessageChannel
StockSharp.Messages
Message channel, based on the queue and operate within a single process.
Inherits: Disposable
Implements: IMessageChannel, IMessageTransport, IDisposable, ICloneable<IMessageChannel>, ICloneable
Constructors
InMemoryMessageChannel
public InMemoryMessageChannel(IMessageQueue queue, string name, Action<Exception> errorHandler)
inMemoryMessageChannel = InMemoryMessageChannel(queue, name, errorHandler)
Initializes a new instance of the InMemoryMessageChannel.
- queue
- Message queue.
- name
- Channel name.
- errorHandler
- Error handler.
Properties
Disabled
public bool Disabled { get; set; }
value = inMemoryMessageChannel.Disabled
inMemoryMessageChannel.Disabled = value
The channel cannot be opened.
MessageCount
public int MessageCount { get; }
value = inMemoryMessageChannel.MessageCount
Message queue count.
State
public ChannelStates State { get; private set; }
value = inMemoryMessageChannel.State
inMemoryMessageChannel.State = value
State.
Methods
Clone
public virtual IMessageChannel Clone()
result = inMemoryMessageChannel.Clone()
Creates a new object that is a deep copy of the current instance.
Returns: A new object that is a deep copy of this instance.
DisposeManaged
protected override void DisposeManaged()
inMemoryMessageChannel.DisposeManaged()
Disposes the managed resources. Override this method to add custom clean up of managed resources.
Events
NewOutMessageAsync
public event Func<Message, CancellationToken, ValueTask> NewOutMessageAsync
inMemoryMessageChannel.NewOutMessageAsync += handler
New message event.
StateChanged
public event Action StateChanged
inMemoryMessageChannel.StateChanged += handler
State change event.