Table of Contents

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 IMessageQueue

Message queue.

name string

Channel name.

errorHandler Action<Exception>

Error handler.

Properties

Disabled

The channel cannot be opened.

public bool Disabled { get; set; }

Property Value

bool

MaxMessageCount

Max message queue count.

public int MaxMessageCount { get; set; }

Property Value

int

Remarks

The default value is -1, which corresponds to the size without limitations.

MessageCount

Message queue count.

public int MessageCount { get; }

Property Value

int

Name

Handler name.

public string Name { get; }

Property Value

string

State

State.

public ChannelStates State { get; }

Property Value

ChannelStates

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 Message

Message.

Returns

bool

true if the specified message was processed successfully, otherwise, false.

Events

NewOutMessage

New message event.

public event Action<Message> NewOutMessage

Event Type

Action<Message>

StateChanged

State change event.

public event Action StateChanged

Event Type

Action