Files
StockSharp/Messages/Testing/EmulationStateMessage.cs
2025-12-29 16:25:58 +03:00

51 lines
1.1 KiB
C#

namespace StockSharp.Messages;
/// <summary>
/// The message, informing about the emulator state change.
/// </summary>
public class EmulationStateMessage : Message, IErrorMessage
{
/// <summary>
/// Date in history for starting the paper trading.
/// </summary>
public DateTime StartDate { get; set; }
/// <summary>
/// Date in history to stop the paper trading (date is included).
/// </summary>
public DateTime StopDate { get; set; }
/// <summary>
/// State.
/// </summary>
public ChannelStates State { get; set; }
/// <inheritdoc />
public Exception Error { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="EmulationStateMessage"/>.
/// </summary>
public EmulationStateMessage()
: base(MessageTypes.EmulationState)
{
}
/// <summary>
/// Create a copy of <see cref="EmulationStateMessage"/>.
/// </summary>
/// <returns>Copy.</returns>
public override Message Clone()
{
var clone = new EmulationStateMessage
{
State = State,
StartDate = StartDate,
StopDate = StopDate,
Error = Error,
};
CopyTo(clone);
return clone;
}
}