Class ChannelMessageAdapter
Message adapter, forward messages through a transport channel IMessageChannel.
Inherited Members
Namespace: StockSharp.Messages
Assembly: StockSharp.Messages.dll
Syntax
public class ChannelMessageAdapter : MessageAdapterWrapper, IMessageAdapterWrapper, IMessageAdapter, IMessageChannel, ICloneable<IMessageChannel>, ICloneable, IPersistable, ILogReceiver, ILogSource, IDisposable
Constructors
ChannelMessageAdapter(IMessageAdapter, IMessageChannel, IMessageChannel)
Initializes a new instance of the ChannelMessageAdapter.
Declaration
public ChannelMessageAdapter(IMessageAdapter innerAdapter, IMessageChannel inputChannel, IMessageChannel outputChannel)
Parameters
Type | Name | Description |
---|---|---|
IMessageAdapter | innerAdapter | Underlying adapter. |
IMessageChannel | inputChannel | Incoming messages channel. |
IMessageChannel | outputChannel | Outgoing message channel. |
Properties
InputChannel
Adapter.
Declaration
public IMessageChannel InputChannel { get; }
Property Value
Type | Description |
---|---|
IMessageChannel |
OutputChannel
Adapter.
Declaration
public IMessageChannel OutputChannel { get; }
Property Value
Type | Description |
---|---|
IMessageChannel |
OwnInputChannel
Control the lifetime of the incoming messages channel.
Declaration
public bool OwnInputChannel { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
OwnOutputChannel
Control the lifetime of the outgoing messages channel.
Declaration
public bool OwnOutputChannel { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
Clone()
Create a copy of ChannelMessageAdapter.
Declaration
public override IMessageChannel Clone()
Returns
Type | Description |
---|---|
IMessageChannel | Copy. |
Dispose()
Declaration
public override void Dispose()
Overrides
OnInnerAdapterNewOutMessage(Message)
Process InnerAdapter output message.
Declaration
protected override void OnInnerAdapterNewOutMessage(Message message)
Parameters
Type | Name | Description |
---|---|---|
Message | message | The message. |
Overrides
OnSendInMessage(Message)
Send message.
Declaration
protected override bool OnSendInMessage(Message message)
Parameters
Type | Name | Description |
---|---|---|
Message | message | Message. |
Returns
Type | Description |
---|---|
Boolean | true if the specified message was processed successfully, otherwise, false. |
Overrides
SendOutMessage(Message)
Send outgoing message.
Declaration
public void SendOutMessage(Message message)
Parameters
Type | Name | Description |
---|---|---|
Message | message | Message. |
Implements
Ecng.Common.ICloneable<>
Ecng.Serialization.IPersistable