Show / Hide Table of Contents

Class InMemoryMessageChannel

Message channel, based on the queue and operate within a single process.

Inheritance
Object
InMemoryMessageChannel
Implements
IMessageChannel
IDisposable
Ecng.Common.ICloneable<IMessageChannel>
ICloneable
Namespace: StockSharp.Messages
Assembly: StockSharp.Messages.dll
Syntax
public class InMemoryMessageChannel : Object, IMessageChannel, IDisposable, ICloneable<IMessageChannel>, ICloneable

Constructors

InMemoryMessageChannel(IMessageQueue, String, Action<Exception>)

Initializes a new instance of the InMemoryMessageChannel.

Declaration
public InMemoryMessageChannel(IMessageQueue queue, string name, Action<Exception> errorHandler)
Parameters
Type Name Description
IMessageQueue queue

Message queue.

String name

Channel name.

Action<Exception> errorHandler

Error handler.

Properties

Disabled

The channel cannot be opened.

Declaration
public bool Disabled { get; set; }
Property Value
Type Description
Boolean

MaxMessageCount

Max message queue count.

Declaration
public int MaxMessageCount { get; set; }
Property Value
Type Description
Int32
Remarks

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

MessageCount

Message queue count.

Declaration
public int MessageCount { get; }
Property Value
Type Description
Int32

Name

Handler name.

Declaration
public string Name { get; }
Property Value
Type Description
String

State

State.

Declaration
public ChannelStates State { get; }
Property Value
Type Description
ChannelStates

SuspendMaxCount

Suspend on SuspendTimeout if message queue is more than the specified count.

Declaration
public int SuspendMaxCount { get; set; }
Property Value
Type Description
Int32

SuspendTimeout

SuspendMaxCount.

Declaration
public TimeSpan SuspendTimeout { get; set; }
Property Value
Type Description
TimeSpan

Methods

Clone()

Create a copy of InMemoryMessageChannel.

Declaration
public virtual IMessageChannel Clone()
Returns
Type Description
IMessageChannel

Copy.

Close()

Close channel.

Declaration
public void Close()

Open()

Open channel.

Declaration
public void Open()

SendInMessage(Message)

Send message.

Declaration
public bool SendInMessage(Message message)
Parameters
Type Name Description
Message message

Message.

Returns
Type Description
Boolean

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

Events

NewOutMessage

New message event.

Declaration
public event Action<Message> NewOutMessage
Event Type
Type Description
Action<Message>

StateChanged

State change event.

Declaration
public event Action StateChanged
Event Type
Type Description
Action

Explicit Interface Implementations

IMessageChannel.Clear()

Declaration
void IMessageChannel.Clear()

IMessageChannel.Resume()

Declaration
void IMessageChannel.Resume()

IMessageChannel.Suspend()

Declaration
void IMessageChannel.Suspend()

Implements

IMessageChannel
System.IDisposable
Ecng.Common.ICloneable<>
System.ICloneable

Extension Methods

Paths.Serialize<T>(T, String)
Paths.Serialize<T>(T)
EditorExtensions.ToItemsSource(Object, Type, Nullable<Boolean>, Nullable<ListSortDirection>, Func<IItemsSourceItem, Boolean>, Func<Object, String>, Func<Object, String>)
XamlHelper.WpfCast<T>(Object)
XamlHelper.CopyToClipboard<T>(T)
XamlHelper.EnsureUIThread(Object)
☀
☾
In This Article
Back to top
Copyright © StockSharp.
☀
☾