namespace StockSharp.Messages; /// /// The types of messages. /// public enum MessageTypes { /// /// . /// Security, /// /// . /// Level1Change, /// /// . /// OrderRegister, /// /// . /// OrderReplace, /// /// [Obsolete] OrderPairReplace, /// /// . /// OrderCancel, /// /// . /// OrderGroupCancel, /// /// . /// Time, /// /// . /// News, /// /// Order error (registration or cancel). /// [Obsolete] OrderError, /// /// . /// Portfolio, /// /// Position. /// [Obsolete] Position, /// /// . /// CandleTimeFrame, /// /// . /// QuoteChange, /// /// . /// Execution, /// /// . /// PositionChange, /// /// Obsolete. /// [Obsolete] PortfolioChange, /// /// . /// MarketData, /// /// Association with . /// [Obsolete] NativeSecurityId, /// /// . /// Connect, /// /// . /// Disconnect, /// /// . /// SecurityLookup, /// /// . /// PortfolioLookup, /// /// Obsolete. /// [Obsolete] SecurityLookupResult, /// /// . /// Error, /// /// . /// BoardState, /// /// . /// OrderStatus, /// /// . /// Board, /// /// Obsolete. /// [Obsolete] PortfolioLookupResult, /// /// . /// ChangePassword, /// /// Clear message queue. /// [Obsolete] ClearQueue, /// /// . /// CandleTick, /// /// . /// CandleVolume, /// /// . /// CandleRange, /// /// . /// CandlePnF, /// /// . /// CandleRenko, /// /// . /// Reset, /// /// . /// SubscriptionFinished, /// /// . /// Remove, /// /// . /// UserInfo, /// /// . /// UserLookup, /// /// Obsolete. /// [Obsolete] UserLookupResult, /// /// Board subscription request. /// [Obsolete] BoardRequest, /// /// . /// BoardLookup, /// /// Obsolete. /// [Obsolete] BoardLookupResult, /// /// . /// UserRequest, /// /// . /// DataTypeLookup, /// /// . /// DataTypeInfo, /// /// /// [Obsolete] SecurityMappingRequest, /// /// /// [Obsolete] SecurityMappingInfo, /// /// . /// SecurityLegsRequest, /// /// . /// SecurityLegsInfo, /// /// /// [Obsolete] AdapterListRequest, /// /// Obsolete. /// [Obsolete] AdapterListFinished, /// /// . /// Command, /// /// /// [Obsolete] AdapterResponse, /// /// . /// SubscriptionListRequest, /// /// Obsolete. /// [Obsolete] SubscriptionListFinished, /// /// /// [Obsolete] SecurityRouteListRequest, /// /// /// [Obsolete] SecurityRoute, /// /// Obsolete. /// [Obsolete] SecurityRouteListFinished, /// /// /// [Obsolete] PortfolioRouteListRequest, /// /// /// [Obsolete] PortfolioRoute, /// /// Obsolete. /// [Obsolete] PortfolioRouteListFinished, /// /// . /// SecurityMapping, /// /// . /// SubscriptionOnline, /// /// . /// SubscriptionResponse, /// /// . /// CandleHeikinAshi, /// /// . /// ProcessSuspended, /// /// . /// EmulationState, /// /// /// [Obsolete] ChangeTimeInterval, /// /// /// [Obsolete] StrategyInfo, /// /// /// [Obsolete] StrategyType, /// /// /// [Obsolete] StrategyState, /// /// . /// RemoteFile, /// /// . /// RemoteFileCommand, /// /// /// [Obsolete] StrategySubscriptionInfo, /// /// /// [Obsolete] StrategyBacktestResult, /// /// /// [Obsolete] AvailableDataRequest, /// /// /// [Obsolete] AvailableDataInfo, /// /// . /// ConnectionLost, /// /// . /// ConnectionRestored, } /// /// Extended info for . /// public class MessageTypeInfo : Equatable { /// /// Message type. /// public MessageTypes Type { get; } /// /// is market-data type. /// public bool? IsMarketData { get; } /// /// Display name. /// public string DisplayName { get; } /// /// Description. /// public string Description { get; } /// /// Initializes a new instance of the . /// /// Message type. /// is market-data type. public MessageTypeInfo(MessageTypes type, bool? isMarketData) : this(type, isMarketData, type.GetDisplayName(), null) { } /// /// Initializes a new instance of the . /// /// Message type. /// is market-data type. /// Display name. /// Description. public MessageTypeInfo(MessageTypes type, bool? isMarketData, string displayName, string description) { Type = type; IsMarketData = isMarketData; DisplayName = displayName; Description = description; } /// public override string ToString() => DisplayName; /// /// Compare on the equivalence. /// /// Another value with which to compare. /// , if the specified object is equal to the current object, otherwise, . protected override bool OnEquals(MessageTypeInfo other) => other.Type == Type; /// public override int GetHashCode() => Type.GetHashCode(); /// /// Create a copy of . /// /// Copy. public override MessageTypeInfo Clone() => new(Type, IsMarketData, DisplayName, Description); }