StockSharp
73 строки · 2.0 Кб
1#region S# License
2/******************************************************************************************
3NOTICE!!! This program and source code is owned and licensed by
4StockSharp, LLC, www.stocksharp.com
5Viewing or use of this code requires your acceptance of the license
6agreement found at https://github.com/StockSharp/StockSharp/blob/master/LICENSE
7Removal of this comment is a violation of the license agreement.
8
9Project: StockSharp.BusinessEntities.BusinessEntities
10File: OrderFail.cs
11Created: 2015, 11, 11, 2:32 PM
12
13Copyright 2010 by StockSharp, LLC
14*******************************************************************************************/
15#endregion S# License
16namespace StockSharp.BusinessEntities
17{
18using System;
19using System.Runtime.Serialization;
20
21using StockSharp.Messages;
22
23/// <summary>
24/// Description of the error that occurred during the registration or cancellation of the order.
25/// </summary>
26[Serializable]
27[DataContract]
28public class OrderFail : IErrorMessage, ILocalTimeMessage, IServerTimeMessage, ISeqNumMessage
29{
30/// <summary>
31/// Initializes a new instance of the <see cref="OrderFail"/>.
32/// </summary>
33public OrderFail()
34{
35}
36
37/// <summary>
38/// The order which was not registered or was canceled due to an error.
39/// </summary>
40[DataMember]
41public Order Order { get; set; }
42
43/// <summary>
44/// System information about error containing the reason for the refusal or cancel of registration.
45/// </summary>
46[DataMember]
47public Exception Error { get; set; }
48
49/// <summary>
50/// Server time.
51/// </summary>
52[DataMember]
53public DateTimeOffset ServerTime { get; set; }
54
55/// <summary>
56/// Local time, when the error has been received.
57/// </summary>
58public DateTimeOffset LocalTime { get; set; }
59
60/// <summary>
61/// Sequence number.
62/// </summary>
63/// <remarks>Zero means no information.</remarks>
64[DataMember]
65public long SeqNum { get; set; }
66
67/// <inheritdoc />
68public override string ToString()
69{
70return $"{Error?.Message}/{Order}";
71}
72}
73}