1 Star 0 Fork 1

jufeng9318/StockSharp

forked from yu3a/StockSharp 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
SubscriptionResponseMessage.cs 1.57 KB
一键复制 编辑 原始数据 按行查看 历史
StockSharp Dev1 提交于 2020-01-06 20:15 +08:00 . More BaseSubscriptionIdMessage usage.
namespace StockSharp.Messages
{
using System;
using System.Runtime.Serialization;
using System.Xml.Serialization;
/// <summary>
/// Subscription response message.
/// </summary>
public class SubscriptionResponseMessage : Message, IOriginalTransactionIdMessage, IErrorMessage
{
/// <summary>
/// Not supported error.
/// </summary>
public static NotSupportedException NotSupported = new NotSupportedException();
/// <inheritdoc />
[DataMember]
[XmlIgnore]
public Exception Error { get; set; }
/// <inheritdoc />
[DataMember]
public long OriginalTransactionId { get; set; }
/// <summary>
/// Initialize <see cref="SubscriptionResponseMessage"/>.
/// </summary>
public SubscriptionResponseMessage()
: base(MessageTypes.SubscriptionResponse)
{
}
/// <summary>
/// Create a copy of <see cref="SubscriptionResponseMessage"/>.
/// </summary>
/// <returns>Copy.</returns>
public override Message Clone()
{
var clone = new SubscriptionResponseMessage();
CopyTo(clone);
return clone;
}
/// <summary>
/// Copy the message into the <paramref name="destination" />.
/// </summary>
/// <param name="destination">The object, to which copied information.</param>
protected void CopyTo(SubscriptionResponseMessage destination)
{
base.CopyTo(destination);
destination.OriginalTransactionId = OriginalTransactionId;
destination.Error = Error;
}
/// <inheritdoc />
public override string ToString()
{
var str = base.ToString();
if (Error != null)
str += $",Error={Error.Message}";
return str;
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/jufeng9318/StockSharp.git
git@gitee.com:jufeng9318/StockSharp.git
jufeng9318
StockSharp
StockSharp
master

搜索帮助