Extensions
扩展课。
属性
public static IEnumerable<Type> AllCandleTypes { get; }
value = Extensions.AllCandleTypes
所有注册的蜡烛类型。
public static SecurityMessage AllSecurity { get; }
value = Extensions.AllSecurity
"所有金融工具"实例.
public static CachedSynchronizedSet<Level1Fields> BestAskFields { get; }
value = Extensions.BestAskFields
与最佳问题相关的字段 。
public static CachedSynchronizedSet<Level1Fields> BestBidFields { get; }
value = Extensions.BestBidFields
与最佳出价有关的领域。
public static CachedSynchronizedSet<Level1Fields> LastTradeFields { get; }
value = Extensions.LastTradeFields
与上个交易有关的领域。
public static IEnumerable<MessageTypes> MarketDataMessageTypes { get; }
value = Extensions.MarketDataMessageTypes
市场数据信息类型.
public static IEnumerable<MessageTypes> TransactionalMessageTypes { get; }
value = Extensions.TransactionalMessageTypes
交易信件类型 。
方法
public static QuoteChangeMessage AddDelta(IOrderBookMessage from, IOrderBookMessage delta)
result = Extensions.AddDelta(from, delta)
以入一序书而加更.
- from
- 初序出书.
- delta
- 换了
返回值: 更更所订之书.
public static QuoteChange[] AddDelta(IEnumerable<QuoteChange> fromQuotes, IEnumerable<QuoteChange> deltaQuotes, bool isBids)
result = Extensions.AddDelta(fromQuotes, deltaQuotes, isBids)
为入引相加变化相.
- fromQuotes
- 出引经.
- deltaQuotes
- 变化.
- isBids
- 引出指向指向所发.
返回值: 已更出引经.
public static void AddMarketDataSupport(MessageAdapter adapter)
Extensions.AddMarketDataSupport(adapter)
填入与市场数据相关的SupportedInMessages消息类型.
- adapter
- 适从者.
public static void AddNotSupportedResultMessage(MessageAdapter adapter, MessageTypes type)
Extensions.AddNotSupportedResultMessage(adapter, type)
添加信息类型为:% NotSupportedResultMessages+% .
- adapter
- 适从者.
- type
- 消息类型 。
public static DateTime AddOrSubtractTradingDays(BoardMessage board, DateTime date, int n, bool checkHolidays)
result = Extensions.AddOrSubtractTradingDays(board, date, n, checkHolidays)
以获得交易日T+/-的日期。
- board
- 董事会信息.
- date
- 起始日期为T,其中加减N交易日.
- n
- N 大小。 增减的交易日数。
- checkHolidays
- 是否检查周一的通过日期(星期六和星期天为休息日,返回的值为 .) 。
返回值: 末端为T+/-N日期.
public static void AddSupportedCandleTimeFrames(MessageAdapter adapter, IEnumerable<TimeSpan> timeFrames)
Extensions.AddSupportedCandleTimeFrames(adapter, timeFrames)
将时间范围添加到DateTime}).
- adapter
- 适从者.
- timeFrames
- 时间范围。
public static void AddSupportedMarketDataType(MessageAdapter adapter, DataType dataType)
Extensions.AddSupportedMarketDataType(adapter, dataType)
将市场数据类型添加到DateTime}).
- adapter
- 适从者.
- dataType
- 数据类型信息.
public static void AddSupportedMessage(MessageAdapter adapter, MessageTypeInfo info)
Extensions.AddSupportedMessage(adapter, info)
添加信息类型为:% PossibleSupportedMessages+% .
- adapter
- 适从者.
- info
- Extended info for MessageTypes.
public static void AddSupportedMessage(MessageAdapter adapter, MessageTypes type, bool? isMarketData)
Extensions.AddSupportedMessage(adapter, type, isMarketData)
添加信息类型为:% SupportedInMessages+% .
- adapter
- 适从者.
- type
- 消息类型 。
- isMarketData
- 是市场数据类型。
public static void AddTransactionalSupport(MessageAdapter adapter)
Extensions.AddTransactionalSupport(adapter)
填入与交易相关的 SupportedInMessages 信件类型 。
- adapter
- 适从者.
public static TMessage Add<TMessage, TChange>(TMessage message, TChange type, CurrencyTypes value)
result = Extensions.Add(message, type, value)
将更改添加到收藏中。
- message
- 换发消息
- type
- 换个类型
- value
- 变化值.
返回值: 换发消息
public static TMessage Add<TMessage, TChange>(TMessage message, TChange type, PortfolioStates value)
result = Extensions.Add(message, type, value)
将更改添加到收藏中。
- message
- 换发消息
- type
- 换个类型
- value
- 变化值.
返回值: 换发消息
public static TMessage Add<TMessage, TChange>(TMessage message, TChange type, DateTime value)
result = Extensions.Add(message, type, value)
将更改添加到收藏中。
- message
- 换发消息
- type
- 换个类型
- value
- 变化值.
返回值: 换发消息
public static TMessage Add<TMessage, TChange>(TMessage message, TChange type, long value)
result = Extensions.Add(message, type, value)
将更改添加到收藏中。
- message
- 换发消息
- type
- 换个类型
- value
- 变化值.
返回值: 换发消息
public static TMessage Add<TMessage, TChange>(TMessage message, TChange type, Sides value)
result = Extensions.Add(message, type, value)
将更改添加到收藏中。
- message
- 换发消息
- type
- 换个类型
- value
- 变化值.
返回值: 换发消息
public static TMessage Add<TMessage, TChange>(TMessage message, TChange type, int value)
result = Extensions.Add(message, type, value)
将更改添加到收藏中。
- message
- 换发消息
- type
- 换个类型
- value
- 变化值.
返回值: 换发消息
public static TMessage Add<TMessage, TChange>(TMessage message, TChange type, decimal value)
result = Extensions.Add(message, type, value)
将更改添加到收藏中。
- message
- 换发消息
- type
- 换个类型
- value
- 变化值.
返回值: 换发消息
public static TMessage Add<TMessage, TChange>(TMessage message, TChange type, object value)
result = Extensions.Add(message, type, value)
将更改添加到收藏中。
- message
- 换发消息
- type
- 换个类型
- value
- 变化值.
返回值: 换发消息
public static TMessage Add<TMessage, TChange>(TMessage message, TChange type, bool value)
result = Extensions.Add(message, type, value)
将更改添加到收藏中。
- message
- 换发消息
- type
- 换个类型
- value
- 变化值.
返回值: 换发消息
public static TMessage Add<TMessage, TChange>(TMessage message, TChange type, SecurityStates value)
result = Extensions.Add(message, type, value)
将更改添加到收藏中。
- message
- 换发消息
- type
- 换个类型
- value
- 变化值.
返回值: 换发消息
public static decimal ApplyNewBalance(decimal? currBal, decimal newBal, long transactionId, ILogReceiver logs)
result = Extensions.ApplyNewBalance(currBal, newBal, transactionId, logs)
检查是否可能 平衡变化。
- currBal
- 现取之.
- newBal
- 新的平衡,我们是新来的
- transactionId
- 交易编号。
- logs
- 日志 记录
返回值: 新的平衡,我们是新来的
public static IAsyncEnumerable<QuoteChangeMessage> BuildIfNeed(IAsyncEnumerable<QuoteChangeMessage> books, ILogReceiver logs)
result = Extensions.BuildIfNeed(books, logs)
以增量更新来构建订单书.
- books
- 订书(可递增).
- logs
- 日志 记录
返回值: 满分订书.
public static IEnumerable<QuoteChangeMessage> BuildIfNeed(IEnumerable<QuoteChangeMessage> books, ILogReceiver logs)
result = Extensions.BuildIfNeed(books, logs)
Try build books by OrderBookIncrementBuilder in case of is incremental changes.
- books
- 令书出.
- logs
- 日志 记录
返回值: 令书出.
public static void ChangeSupported(IMessageAdapter adapter, bool add, bool isMarketData)
Extensions.ChangeSupported(adapter, add, isMarketData)
Change SupportedInMessages.
- adapter
- 适从者.
- add
- 指挥
- isMarketData
- 消息类型.
public static IMessageAdapter CreateAdapter(Type adapterType, IdGenerator idGenerator)
result = Extensions.CreateAdapter(adapterType, idGenerator)
Create IMessageAdapter.
- adapterType
- 适应器类型.
- idGenerator
- 交易ID生成器。
返回值: IMessageAdapter例.
public static IMessageAdapter CreateAdapter(Type adapterType)
result = Extensions.CreateAdapter(adapterType)
Create IMessageAdapter instance.
- adapterType
- 适应器类型.
返回值: IMessageAdapter例.
public static CandleMessage CreateCandleMessage(Type messageType)
result = Extensions.CreateCandleMessage(messageType)
创建 CandleMessage 实例 。
- messageType
- 烛之通旨之类.
返回值: Instance of CandleMessage.
public static Message CreateErrorResponse(Message message, Exception ex, ILogReceiver logs, Func<DataType, long[]> getSubscribers)
result = Extensions.CreateErrorResponse(message, ex, logs, getSubscribers)
创建错误响应 。
- message
- 原发文.
- ex
- 错误。
- logs
- 日志 记录
- getSubscribers
- 订阅者标识器提供者。
返回值: 错误响应 。
public static ChannelExecutor CreateExecutorAndRun(TimeSpan interval, Action<Exception> errorHandler, CancellationToken token)
result = Extensions.CreateExecutorAndRun(interval, errorHandler, token)
Create and run ChannelExecutor.
- interval
- 处理信件的时间间隔 。
- errorHandler
- 处理错误者 。
- token
- CancellationToken
返回值: ChannelExecutor
public static SubscriptionResponseMessage CreateNotSupported(long id)
result = Extensions.CreateNotSupported(id)
创建非支持的订阅响应 。
- id
- 为该消息作为响应的原始消息的ID.
返回值: 订阅响应消息.
public static OrderCondition CreateOrderCondition(IMessageAdapter adapter)
result = Extensions.CreateOrderCondition(adapter)
创建命令类型条件,该条件支持适配器。
- adapter
- 适从者.
返回值: 秩序条件。
public static OrderCondition CreateOrderCondition(Type orderConditionType)
result = Extensions.CreateOrderCondition(orderConditionType)
创建命令类型条件,该条件支持适配器。
- orderConditionType
- Type of OrderCondition.
返回值: 秩序条件。
public static IOrderLogMarketDepthBuilder CreateOrderLogMarketDepthBuilder(Type builderType, SecurityId securityId)
result = Extensions.CreateOrderLogMarketDepthBuilder(builderType, securityId)
创建 IOrderLogMarketDepthBuilder 实例 。
- builderType
- 建构器类型.
- securityId
- 金融工具标识。
返回值: IOrderLogMarketDepthBuilder例.
public static ExecutionMessage CreateOrderReply(long transactionId, DateTime serverTime)
result = Extensions.CreateOrderReply(transactionId, serverTime)
创建订单交易回复 。
- transactionId
- 交易身份证明。
- serverTime
- 服务器时间 。
返回值: 消息中包含执行信息.
public static PositionChangeMessage CreatePortfolioChangeMessage(IMessageAdapter adapter, string pfName)
result = Extensions.CreatePortfolioChangeMessage(adapter, pfName)
初始化了 & ##PositionChangeMessage+#的新实例.
- adapter
- 交易系统适配器.
- pfName
- 组合名.
返回值: 组合变化信息.
public static PositionChangeMessage CreatePositionChangeMessage(IMessageAdapter adapter, string pfName, SecurityId securityId, string depoName)
result = Extensions.CreatePositionChangeMessage(adapter, pfName, securityId, depoName)
初始化了 & ##PositionChangeMessage+#的新实例.
- adapter
- 交易系统适配器.
- pfName
- 组合名.
- securityId
- 金融工具标识。
- depoName
- 实物金融工具的存放地。
返回值: 位置更改消息 。
public static ExecutionMessage CreateReply(OrderMessage message, Exception error)
result = Extensions.CreateReply(message, error)
铸造OrderMessage到ExecutionMessage.
- message
- OrderMessage.
- error
- 错误信息 。
返回值: ExecutionMessage.
public static SubscriptionResponseMessage CreateResponse(ISubscriptionMessage message, Exception error)
result = Extensions.CreateResponse(message, error)
创建订阅响应 。
- message
- 订阅.
- error
- 错误信息 。
返回值: 订阅响应消息.
public static Message CreateResult(ISubscriptionMessage message)
result = Extensions.CreateResult(message)
创建 SubscriptionOnlineMessage 或 SubscriptionFinishedMessage 取决于 To 。
- message
- 订阅.
返回值: 传言.
public static SubscriptionResponseMessage CreateSubscriptionResponse(long id, Exception error)
result = Extensions.CreateSubscriptionResponse(id, error)
创建订阅响应 。
- id
- 为该消息作为响应的原始消息的ID.
- error
- 错误信息 。
返回值: 订阅响应消息.
public static string DataTypeArgToString(Type messageType, object arg)
result = Extensions.DataTypeArgToString(messageType, arg)
将蜡烛参数转换为文件夹名称来取代保留的符号 。
- messageType
- 烛之通旨之类.
- arg
- 蜡烛取出.
返回值: 目录名.
public static string DataTypeArgToString(DataType dataType)
result = Extensions.DataTypeArgToString(dataType)
将蜡烛参数转换为文件夹名称来取代保留的符号 。
- dataType
- 数据类型信息.
返回值: 目录名.
public static string DataTypeToFileName(DataType dataType)
result = Extensions.DataTypeToFileName(dataType)
Convert file name to DataType.
- dataType
- 数据类型信息.
返回值: 档案名.
public static SecurityIdGenerator EnsureGetGenerator(SecurityIdGenerator generator)
result = Extensions.EnsureGetGenerator(generator)
返回指定的生成器,或在 时返回默认值。
- generator
- SecurityIdGenerator
返回值: SecurityIdGenerator
public static DateTime? EnsureToday(DateTime? date)
result = Extensions.EnsureToday(date)
确定指定的日期为“今天”,返回“今天”。
- date
- 指定日期 。
返回值: 结果值。
public static DateTime? EnsureToday(DateTime? date, DateTime? todayValue)
result = Extensions.EnsureToday(date, todayValue)
确定指定的日期为“今天”,返回“。
- date
- 指定日期 。
- todayValue
- 今天的价值。
返回值: 结果值。
public static DataType FileNameToDataType(string fileName)
result = Extensions.FileNameToDataType(fileName)
Convert DataType to file name.
- fileName
- 档案名.
返回值: 数据类型信息.
public static SecurityMessage FillDefaultCryptoFields(SecurityId secId)
result = Extensions.FillDefaultCryptoFields(secId)
将默认的CryptoCurrency价格和体积步骤填充0.00000001值.
- secId
- 金融工具标识。
返回值: 包含金融工具信息的信息。
public static SecurityMessage FillDefaultCryptoFields(SecurityMessage message)
result = Extensions.FillDefaultCryptoFields(message)
将默认的CryptoCurrency价格和体积步骤填充0.00000001值.
- message
- 包含金融工具信息的信息。
返回值: 包含金融工具信息的信息。
public static IEnumerable<BoardMessage> Filter(IEnumerable<BoardMessage> boards, BoardLookupMessage criteria)
result = Extensions.Filter(boards, criteria)
以代码标准过滤板 。
- boards
- 所有板子都一样
- criteria
- 标准。
返回值: 发现的板子。
public static IEnumerable<SecurityMessage> Filter(IEnumerable<SecurityMessage> securities, SecurityLookupMessage criteria)
result = Extensions.Filter(securities, criteria)
以给定的标准过滤仪器 。
- securities
- 金融工具。
- criteria
- 信件金融工具查找指定标准 。
返回值: 仪器被过滤。
public static IEnumerable<TimeSpan> FilterTimeFrames(IEnumerable<DataType> dataTypes)
result = Extensions.FilterTimeFrames(dataTypes)
从指定的数据类型中提取时间框架 。
- dataTypes
- 数据类型.
返回值: 可能的时限。
public static IEnumerable<TMessage> Filter<TMessage>(IEnumerable<TMessage> messages, DateTime from, DateTime to)
result = Extensions.Filter(messages, from, to)
要过滤给定时间段的邮件 。
- messages
- 所有信息,其中必须查找所需信息。
- from
- 搜索的起始日期 。
- to
- 搜索的结束日期 。
返回值: 被过滤的信件 。
public static TAdapter FindAdapter<TAdapter>(IMessageAdapterWrapper wrapper)
result = Extensions.FindAdapter(wrapper)
按指定类型查找适配器。
- wrapper
- 包接基于适配器 。
返回值: 找到适配器或.
public static TAdapter FindAdapter<TAdapter>(IMessageAdapter adapter)
result = Extensions.FindAdapter(adapter)
按指定类型查找适配器。
- adapter
- 适从者.
返回值: 找到适配器或.
public static IMessageAdapter FindById(IEnumerable<IMessageAdapter> adapters, Guid id)
result = Extensions.FindById(adapters, id)
以指定的密钥获取适配器 。
- adapters
- 所有可用的适配器.
- id
- 适配器识别器.
返回值: 找到适配器或.
public static ValueTuple<string, string> FormatToString(DataType dataType)
result = Extensions.FormatToString(dataType)
Convert DataType to String value.
- dataType
- 数据类型信息.
返回值: 字符串值 。
public static ValueTuple<CurrencyTypes?, Exception> FromMicexCurrencyName(string name)
result = Extensions.FromMicexCurrencyName(name)
要将 MICEX 格式的货币名称转换为 CurrencyTypes 。
- name
- MICEX格式的货币名称.
返回值: 货币类型。 如果数值为空, 将会返回 。
public static CurrencyTypes? FromMicexCurrencyName(string name, Action<Exception> errorHandler)
result = Extensions.FromMicexCurrencyName(name, errorHandler)
要将 MICEX 格式的货币名称转换为 CurrencyTypes 。
- name
- MICEX格式的货币名称.
- errorHandler
- 处理错误者 。
返回值: 货币类型。 如果数值为空, 将会返回 。
public static object GetArg(MarketDataMessage mdMsg)
result = Extensions.GetArg(mdMsg)
获取打入的参数 。
- mdMsg
- 市场数据信息(在发件情况下用作订阅/不订阅,在发件情况下为确认事件).
返回值: 附加的论据,与数据相关,例如蜡烛论据.
public static TArg GetArg<TArg>(MarketDataMessage mdMsg)
result = Extensions.GetArg(mdMsg)
获取打入的参数 。
- mdMsg
- 市场数据信息(在发件情况下用作订阅/不订阅,在发件情况下为确认事件).
返回值: 附加的论据,与数据相关,例如蜡烛论据.
public static decimal GetBalance(ExecutionMessage message)
result = Extensions.GetBalance(message)
获得平衡。
- message
- 消息中包含执行信息.
返回值: 订单合同余额。
public static QuoteChange? GetBestAsk(IOrderBookMessage message)
result = Extensions.GetBestAsk(message)
问吧
- message
- 市场深度.
返回值: 最好问,或者,如果没有问是空的。
public static QuoteChange? GetBestBid(IOrderBookMessage message)
result = Extensions.GetBestBid(message)
买最好的价
- message
- 市场深度.
返回值: 最好出价,或者,如果没有出价是空的。
public static ValueTuple<QuoteChange?, QuoteChange?> GetBestPair(IOrderBookMessage book)
result = Extensions.GetBestPair(book)
找对最好的
- book
- IOrderBookMessage
返回值: 最好的一对。
public static Type GetCandleArgType(Type candleMessageType)
result = Extensions.GetCandleArgType(candleMessageType)
去拿蜡烛的词
- candleMessageType
- 蜡烛信息类型 。
返回值: 蜡烛型.
public static Range<DateTime> GetCandleBounds(TimeSpan timeFrame, DateTime currentTime, TimeZoneInfo timeZone, WorkingTime time)
result = Extensions.GetCandleBounds(timeFrame, currentTime, timeZone, time)
获取蜡烛时间框架 相对交换工作模式。
- timeFrame
- 获取时间范围所需的时间范围 。
- currentTime
- 时间范围内的当前时间 。
- timeZone
- 交流所在时区信息.
- time
- 交流工作模式信息.
返回值: 蜡烛时间框架。
public static Range<DateTime> GetCandleBounds(TimeSpan timeFrame, DateTime currentTime)
result = Extensions.GetCandleBounds(timeFrame, currentTime)
获取蜡烛时间框架 相对交换工作模式。
- timeFrame
- 获取时间范围所需的时间范围 。
- currentTime
- 时间范围内的当前时间 。
返回值: 蜡烛时间框架。
public static TimeSpan GetDefaultHistoryStepSize(IMessageAdapter adapter, SecurityId securityId, DataType dataType, TimeSpan iterationInterval)
result = Extensions.GetDefaultHistoryStepSize(adapter, securityId, dataType, iterationInterval)
获取历史下载允许的最大尺寸步骤 。
- adapter
- 交易系统适配器.
- securityId
- SecurityId
- dataType
- 数据类型信息.
- iterationInterval
- 迭相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相
返回值: 步入.
public static int? GetDefaultMaxCount(DataType dataType)
result = Extensions.GetDefaultMaxCount(dataType)
获取每个订阅请求中最大可能的项数 。
- dataType
- 数据类型信息.
返回值: 最大项目数。
private static QuoteChange[] GetDelta(IEnumerable<QuoteChange> from, IEnumerable<QuoteChange> to, IComparer<decimal> comparer)
result = Extensions.GetDelta(from, to, comparer)
以计算出引号之间的变化.
- from
- 初引经.
- to
- 二引证相.
- comparer
- 取向,显示引文的类型.
返回值: 变化.
public static QuoteChangeMessage GetDelta(IOrderBookMessage from, IOrderBookMessage to)
result = Extensions.GetDelta(from, to)
计算订单簿之间的变化。
- from
- 初序出书.
- to
- 二序书.
返回值: 订货簿,只存储增量.
public static T GetId<T>(CommandMessage message)
result = Extensions.GetId(message)
Get typed ObjectId.
- message
- CommandMessage.
返回值: Typed ObjectId.
public static decimal? GetLastTradePrice(Level1ChangeMessage message)
result = Extensions.GetLastTradePrice(message)
拿到最后的滴滴交易价格。
- message
- 市场深度.
返回值: 中间的传播。如果引用是空的。
public static decimal? GetMatchedVolume(IOrderMessage order)
result = Extensions.GetMatchedVolume(order)
计算执行的音量部分以求令 。
- order
- 所取之令,所取已执行之部分,应取所取之量.
返回值: 量的已执行部分。
public static decimal GetMedianPrice(ICandleMessage candle)
result = Extensions.GetMedianPrice(candle)
计算出蜡烛的中位价。
- candle
- ICandleMessage
返回值: 中价(出众出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出
public static OrderLogCancelReasons GetOrderLogCancelReason(ExecutionMessage item)
result = Extensions.GetOrderLogCancelReason(item)
以获得取消订单的理由 在订单日志。
- item
- 秩序记录项目。
返回值: 命令取消的原因, 以顺序日志 。
public static ValueTuple<QuoteChange?, QuoteChange?> GetPair(IOrderBookMessage book, int depthIndex)
result = Extensions.GetPair(book, depthIndex)
以深度指数获得一对引号(bid + offer).
- book
- IOrderBookMessage
- depthIndex
- 深度指数,0指数表示最优对引出.
返回值: 引用的对。 如果索引大于书序深度, 则返回 。
public static TimeInForce? GetPlazaTimeInForce(long status)
result = Extensions.GetPlazaTimeInForce(status)
Extract TimeInForce from bits flag.
- status
- 位子旗 (英语).
返回值: TimeInForce.
public static string GetPreferredLanguage(MessageAdapterCategories? categories)
result = Extensions.GetPreferredLanguage(categories)
获得首选语言.
- categories
- 消息适配器分类 。
返回值: 语言
public static decimal? GetPrice(IOrderBookMessage message, Sides? side)
result = Extensions.GetPrice(message, side)
边价边取.
- message
- IOrderBookMessage
- side
- 边
返回值: 价相相相会.
public static decimal GetPriceStep(int decimals)
result = Extensions.GetPriceStep(decimals)
以准确性为基础获得价格递增.
- decimals
- 德克马斯
返回值: 价阶.
public static Type GetProcessorType(IBasketSecurityProcessorProvider provider, string basketCode)
result = Extensions.GetProcessorType(provider, basketCode)
获取处理器类型 。
- provider
- IBasketSecurityProcessorProvider
- basketCode
- 篮子金融工具类型.
返回值: 处理器类型 。
public static Type GetSecurityType(IBasketSecurityProcessorProvider provider, string basketCode)
result = Extensions.GetSecurityType(provider, basketCode)
获取金融工具类型。
- provider
- IBasketSecurityProcessorProvider
- basketCode
- 篮子金融工具类型.
返回值: 金融工具类型。
public static HashSet<SecurityTypes> GetSecurityTypes(ISecurityTypesMessage message)
result = Extensions.GetSecurityTypes(message)
Get SecurityTypes.
- message
- 信件金融工具查找指定标准 。
返回值: 金融工具类型。
public static DateTime GetServerTime(Message message)
result = Extensions.GetServerTime(message)
获取消息服务器时间 。
- message
- 传言.
返回值: 服务器时间 。
public static decimal? GetSpreadMiddle(decimal? bestBidPrice, decimal? bestAskPrice, decimal? priceStep)
result = Extensions.GetSpreadMiddle(bestBidPrice, bestAskPrice, priceStep)
获得中相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相
- bestBidPrice
- 最佳出价 买价
- bestAskPrice
- 最好问价。
- priceStep
- PriceStep
返回值: 中间的传播。如果引用是空的。
public static decimal GetSpreadMiddle(decimal bestBidPrice, decimal bestAskPrice, decimal? priceStep)
result = Extensions.GetSpreadMiddle(bestBidPrice, bestAskPrice, priceStep)
获得中相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相
- bestBidPrice
- 最佳出价 买价
- bestAskPrice
- 最好问价。
- priceStep
- PriceStep
返回值: 中间的传播。如果引用是空的。
public static decimal? GetSpreadMiddle(IOrderBookMessage message, decimal? priceStep)
result = Extensions.GetSpreadMiddle(message, priceStep)
获得中相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相
- message
- 市场深度.
- priceStep
- PriceStep
返回值: 中间的传播。如果引用是空的。
public static decimal? GetSpreadMiddle(Level1ChangeMessage message, decimal? priceStep)
result = Extensions.GetSpreadMiddle(message, priceStep)
获得中相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相
- message
- 市场深度.
- priceStep
- PriceStep
返回值: 中间的传播。如果引用是空的。
public static long[] GetSubscriptionIds(ISubscriptionIdMessage message)
result = Extensions.GetSubscriptionIds(message)
从指定信件中获取订阅标识符 。
- message
- 传言.
返回值: 辨相者.
public static TimeSpan GetTimeFrame(MarketDataMessage mdMsg)
result = Extensions.GetTimeFrame(mdMsg)
从指定的市场数据消息中获取时间范围 。
- mdMsg
- 市场数据信息(在发件情况下用作订阅/不订阅,在发件情况下为确认事件).
返回值: 时间范围。
public static TimeSpan GetTimeFrame(DataType dataType)
result = Extensions.GetTimeFrame(dataType)
获得时间范围。
- dataType
- DataType.
返回值: 时间范围。
public static long GetTimeFrameCount(Range<DateTime> range, TimeSpan timeFrame, WorkingTime workingTime)
result = Extensions.GetTimeFrameCount(range, timeFrame, workingTime)
以在指定的时间范围内获得时间框架的数量。
- range
- 需要获得时间框架的指定时间范围。
- timeFrame
- 时间范围。
- workingTime
- WorkingTime.
返回值: 收到的时间范围 。
public static IEnumerable<TimeSpan> GetTimeFrames(IMessageAdapter adapter, SecurityId securityId, DateTime? from, DateTime? to)
result = Extensions.GetTimeFrames(adapter, securityId, from, to)
获得指定仪器的可能时限。
- adapter
- 交易系统适配器.
- securityId
- 金融工具标识。
- from
- 您需要获取数据的初始日期 。
- to
- 您需要获取数据的最后日期 。
返回值: 可能的时限。
public static IAsyncEnumerable<TimeSpan> GetTimeFramesAsync(IMessageAdapter adapter, SecurityId securityId, DateTime? from, DateTime? to)
result = Extensions.GetTimeFramesAsync(adapter, securityId, from, to)
获得指定仪器的可能时限。
- adapter
- 交易系统适配器.
- securityId
- 金融工具标识。
- from
- 您需要获取数据的初始日期 。
- to
- 您需要获取数据的最后日期 。
返回值: 可能的时限。
public static IEnumerable<ValueTuple<QuoteChange?, QuoteChange?>> GetTopPairs(IOrderBookMessage book, int depth)
result = Extensions.GetTopPairs(book, depth)
以取一对引出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所
- book
- IOrderBookMessage
- depth
- 书深取出,计数出自最上正引.
返回值: 散开
public static IEnumerable<QuoteChange> GetTopQuotes(IOrderBookMessage book, int depth)
result = Extensions.GetTopQuotes(book, depth)
以获得给定书深所取出之引.
- book
- IOrderBookMessage
- depth
- 书深. 引文按出价从出价到出价的涨价顺序排列.
返回值: 散开
public static decimal GetTradePrice(ExecutionMessage message)
result = Extensions.GetTradePrice(message)
Get TradePrice.
- message
- 消息中包含执行信息.
返回值: 贸易价格。
public static decimal GetTradeVolume(ExecutionMessage message)
result = Extensions.GetTradeVolume(message)
Get TradeVolume.
- message
- 消息中包含执行信息.
返回值: 贸易量.
public static decimal GetTypicalPrice(ICandleMessage candle)
result = Extensions.GetTypicalPrice(candle)
计算蜡烛的典型价格.
- candle
- ICandleMessage
返回值: 典型的价格。
public static string GetUnderlyingCode(SecurityMessage secMsg)
result = Extensions.GetUnderlyingCode(secMsg)
获取内幕资产。
- secMsg
- SecurityMessage
返回值: 基础资产。
public static QuoteChangeMessage Group(IOrderBookMessage depth, decimal priceRange)
result = Extensions.Group(depth, priceRange)
将订货簿按价格范围分组。
- depth
- 所要分集之令书.
- priceRange
- 价格范围,应进行分类。
返回值: 被分组的订单本.
public static QuoteChange[] Group(QuoteChange[] quotes, Sides side, decimal priceRange)
result = Extensions.Group(quotes, side, priceRange)
以价取相取为组引.
- quotes
- 引文格式为组.
- side
- 边.
- priceRange
- 价格范围,应进行分类。
返回值: 群取所引为相.
public static bool HasChanges<TMessage, TChange>(BaseChangeMessage<TMessage, TChange> message)
result = Extensions.HasChanges(message)
确定信件中包含任何更改。
- message
- 换发消息
返回值: 检查结果。
public static bool HasOrderId(OrderStatusMessage message)
result = Extensions.HasOrderId(message)
确定指定信件包含单项命令请求。
- message
- 传言.
返回值: 检查结果。
public static bool HasOrderInfo(ExecutionMessage message)
result = Extensions.HasOrderInfo(message)
确定指定信件是否包含命令信息。
- message
- 腾讯.
返回值: 如果指定的信息包含命令信息,则不在此限,
public static bool HasSubscriptionId(ISubscriptionIdMessage message)
result = Extensions.HasSubscriptionId(message)
检查指定信件中的订阅标识符 。
- message
- 传言.
返回值: 辨相者.
public static bool HasTradeInfo(ExecutionMessage message)
result = Extensions.HasTradeInfo(message)
确定指定信件是否包含贸易信息。
- message
- 腾讯.
返回值: 如果指定的信息包含贸易信息,否则,
public static Sides Invert(Sides side)
result = Extensions.Invert(side)
以取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取
- side
- 初入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正入正
返回值: 反相取向.
public static bool IsAllSecurity(ISecurityIdMessage message)
result = Extensions.IsAllSecurity(message)
检查指定的 ISecurityIdMessage 是 SecurityId 。
- message
- ISecurityIdMessage
返回值: ,否则,
public static bool IsAllSecurity(SecurityId securityId)
result = Extensions.IsAllSecurity(securityId)
检查指定的 SecurityId 是 SecurityId 。
- securityId
- SecurityId
返回值: ,否则,
public static bool IsAssociated(SecurityId securityId, string boardCode)
result = Extensions.IsAssociated(securityId, boardCode)
与董事会有关的特定金融工具。
- securityId
- 金融工具标识。
- boardCode
- 董事会代码。
返回值: ,如果关联,否则,
public static bool IsBack(IMessage message)
result = Extensions.IsBack(message)
确定指定的消息是回回转。
- message
- 传言.
返回值: 是回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回回
public static bool IsBasket(SecurityMessage security)
result = Extensions.IsBasket(security)
指定金融工具是篮子。
- security
- 金融工具。
返回值: 检查结果。
public static bool IsBestAskField(Level1Fields field)
result = Extensions.IsBestAskField(field)
指定的一级字段是否与最佳询问相关 。
- field
- 田地 田地 田地
返回值: 检查结果。
public static bool IsBestBidField(Level1Fields field)
result = Extensions.IsBestBidField(field)
指定的一级域是否与最佳出价有关?.
- field
- 田地 田地 田地
返回值: 检查结果。
public static bool IsBuildOnly(Type candleType)
result = Extensions.IsBuildOnly(candleType)
确定指定的蜡烛类型是否只能从基础数据中构建.
- candleType
- 烛之通旨之类.
返回值: 检查结果。
public static bool IsCanceled(IOrderMessage order)
result = Extensions.IsCanceled(order)
检查订单是否被取消 。
- order
- 令取所检.
返回值: 如果取消命令,否则,
public static bool IsCandle(MessageTypes type)
result = Extensions.IsCandle(type)
确定蜡烛数据类型 。
- type
- 消息类型 。
返回值: ,如果数据类型是蜡烛,否则,
public static bool IsCandleMessage(Type messageType)
result = Extensions.IsCandleMessage(messageType)
确定指定的消息类型是否取自 CandleMessage 。
- messageType
- 消息类型.
返回值: 如果指定的消息类型来自CandleMessage,否则,.
public static ValueTask<bool> IsCandlesSupportedAsync(IMessageAdapter adapter, MarketDataMessage subscription, CancellationToken cancellationToken)
result = Extensions.IsCandlesSupportedAsync(adapter, subscription, cancellationToken)
确定指定的订阅请求是否得到适配器的支持。
- adapter
- 适从者.
- subscription
- 订阅.
- cancellationToken
- CancellationToken
返回值: 如果指定的订阅请求得到支持,则不在此限,
public static bool IsContainsCandle(Level1ChangeMessage level1)
result = Extensions.IsContainsCandle(level1)
检查一下,第1级数据中是否有IsCandles.
- level1
- 1级数据.
返回值: 考证结果.
public static bool IsContainsQuotes(Level1ChangeMessage level1)
result = Extensions.IsContainsQuotes(level1)
检查一下,第1级是否有引文。
- level1
- 1级数据.
返回值: 出引经.
public static bool IsContainsTick(Level1ChangeMessage level1)
result = Extensions.IsContainsTick(level1)
要检查, 级别1 中是否有勾选数据 。
- level1
- 1级数据.
返回值: 考证结果.
public static bool IsFinal(OrderStates state)
result = Extensions.IsFinal(state)
指定状态是否为最终状态( 已执行或失败) 。
- state
- 令发相相.
返回值: 检查结果。
public static bool IsFinal(IOrderBookMessage depth)
result = Extensions.IsFinal(depth)
确定订单是否为最终版本 。
- depth
- 订购书电.
返回值: 如果订货单是最后的 否则
public static bool IsFullEmpty(IOrderBookMessage depth)
result = Extensions.IsFullEmpty(depth)
确定,是命令书空出.
- depth
- 市场深度.
返回值: 如果订书是空的 否则
public static bool IsHalfEmpty(IOrderBookMessage depth)
result = Extensions.IsHalfEmpty(depth)
确定一下,就是半空的订书
- depth
- 市场深度.
返回值: 如果订书是半空的 否则
public static bool IsHistoryOnly(ISubscriptionMessage message)
result = Extensions.IsHistoryOnly(message)
确定指定的信件只包含历史请求。
- message
- 订阅.
返回值: 检查结果。
public static bool IsIndex(SecurityMessage security)
result = Extensions.IsIndex(security)
指定金融工具为指数。
- security
- 金融工具。
返回值: 检查结果。
public static bool IsIntraday(TimeSpan tf)
result = Extensions.IsIntraday(tf)
确定指定的时间范围为日内。
- tf
- 时间范围。
返回值: 检查结果。
public static bool IsLastTradeField(Level1Fields field)
result = Extensions.IsLastTradeField(field)
是否指定的一级字段与上次交易有关 。
- field
- 田地 田地 田地
返回值: 检查结果。
public static bool IsLookup(MessageTypes type)
result = Extensions.IsLookup(type)
确定指定信件类型为查找。
- type
- MessageTypes
返回值: 检查结果。
public static bool IsLookup(IMessage message)
result = Extensions.IsLookup(message)
确定指定信件是查找。
- message
- 消息
返回值: 检查结果。
public static bool IsLookupAll(SecurityLookupMessage criteria)
result = Extensions.IsLookupAll(criteria)
确定所有过滤器的搜索内容 。
- criteria
- 其字段会用作过滤器的仪器.
返回值: 检查结果。
public static bool IsMarketData(ExecutionMessage execMsg)
result = Extensions.IsMarketData(execMsg)
确定是否包含市场数据信息。
- execMsg
- 消息中包含执行信息.
返回值: 检查结果。
public static bool IsMarketData(IMessageAdapter adapter)
result = Extensions.IsMarketData(adapter)
是否指定适配器支持市场数据 。
- adapter
- 适从者.
返回值: 检查结果。
public static ValueTask<bool> IsMarketDataTypeSupportedAsync(IMessageAdapter adapter, DataType type, CancellationToken cancellationToken)
result = Extensions.IsMarketDataTypeSupportedAsync(adapter, type, cancellationToken)
确定指定的市场数据类型是否由适配器支持.
- adapter
- 适从者.
- type
- 消息类型 。
- cancellationToken
- CancellationToken
返回值: 如果指定的消息类型得到支持,则不在此限,
public static bool IsMatch(ExecutionMessage transaction, OrderStatusMessage criteria, ISet<OrderStates> states)
result = Extensions.IsMatch(transaction, criteria, states)
确定指定的交易符合查询标准。
- transaction
- 交易。
- criteria
- 用作过滤器的字段顺序 。
- states
- 按指定状态过滤顺序 。
返回值: 检查结果。
public static bool IsMatch(SecurityMessage security, SecurityLookupMessage criteria, HashSet<SecurityTypes> secTypes)
result = Extensions.IsMatch(security, criteria, secTypes)
确定指定的金融工具符合查询标准。
- security
- 金融工具。
- criteria
- 信件金融工具查找指定标准 。
- secTypes
- 金融工具类型。
返回值: 检查结果。
public static bool IsMatch(SecurityMessage security, SecurityLookupMessage criteria)
result = Extensions.IsMatch(security, criteria)
确定指定的金融工具符合查询标准。
- security
- 金融工具。
- criteria
- 信件金融工具查找指定标准 。
返回值: 检查结果。
public static bool IsMatch(ExecutionMessage transaction, OrderStatusMessage criteria)
result = Extensions.IsMatch(transaction, criteria)
确定指定的信件匹配的查找标准。
- transaction
- 交易。
- criteria
- 将用作过滤器的信息 。
返回值: 检查结果。
public static bool IsMatch(PositionChangeMessage position, PortfolioLookupMessage criteria, bool compareName)
result = Extensions.IsMatch(position, criteria, compareName)
确定指定的信件匹配的查找标准。
- position
- 位置 准备
- criteria
- 将用作过滤器的信息 。
- compareName
- Fully compare PortfolioName.
返回值: 检查结果。
public static bool IsMatch(PortfolioMessage portfolio, PortfolioLookupMessage criteria, bool compareName)
result = Extensions.IsMatch(portfolio, criteria, compareName)
确定指定的信件匹配的查找标准。
- portfolio
- 组合.
- criteria
- 将用作过滤器的信息 。
- compareName
- Fully compare PortfolioName.
返回值: 检查结果。
public static bool IsMatch(BoardMessage board, BoardLookupMessage criteria)
result = Extensions.IsMatch(board, criteria)
确定指定的信件匹配的查找标准。
- board
- 董事会。
- criteria
- 将用作过滤器的信息 。
返回值: 检查结果。
public static bool IsMatch(ISubscriptionIdMessage message, MessageTypes type, ISubscriptionMessage criteria)
result = Extensions.IsMatch(message, type, criteria)
确定指定的信件匹配的查找标准。
- message
- 传言.
- type
- 类型
- criteria
- 将用作过滤器的信息 。
返回值: 检查结果。
public static bool IsMatched(IOrderMessage order)
result = Extensions.IsMatched(order)
要检查, 命令是否完全匹配 。
- order
- 令取所检.
返回值: 如果命令完全匹配 否则
public static bool IsMatchedEmpty(IOrderMessage order)
result = Extensions.IsMatchedEmpty(order)
检查,如果合同没有按部就班地执行。
- order
- 令取所检.
返回值: ,如果合同没有执行,否则,
public static bool IsMatchedPartially(IOrderMessage order)
result = Extensions.IsMatchedPartially(order)
要检查,是量的一部分按顺序执行.
- order
- 令取所检.
返回值: ,如果部分量被执行,否则,
public static bool IsMessageSupported(IMessageAdapter adapter, MessageTypes type)
result = Extensions.IsMessageSupported(adapter, type)
确定指定的信件类型是否包含在 SupportedInMessages 中 。
- adapter
- 适从者.
- type
- 消息类型 。
返回值: 如果指定的消息类型得到支持,则不在此限,
public static bool IsMoney(SecurityId secId)
result = Extensions.IsMoney(secId)
检查指定的ID是否为钱ID.
- secId
- 消息中包含有关位置变化的信息.
返回值: 检查结果。
public static bool IsMoney(PositionChangeMessage posMsg)
result = Extensions.IsMoney(posMsg)
确定指定信件包含 Money 位置 。
- posMsg
- 消息中包含有关位置变化的信息.
返回值: 检查结果。
public static bool IsNotSupported(SubscriptionResponseMessage message)
result = Extensions.IsNotSupported(message)
确定回复中是否包含%\ NotSupported\\\\\\ 错误。
- message
- 答曰. 师曰.
返回值: 检查结果。
public static string Iso10962(SecurityMessage security)
result = Extensions.Iso10962(security)
以ISO 10962标准获得该仪器的型号.
- security
- 金融工具。
返回值: 入入出于ISO 10962标准.
public static OptionTypes? Iso10962ToOptionType(string cfi)
result = Extensions.Iso10962ToOptionType(cfi)
将ISO 10962标准中的类型转换为 OptionTypes 。
- cfi
- 入入出于ISO 10962标准.
返回值: 选择类型。
public static SecurityTypes? Iso10962ToSecurityType(string cfi)
result = Extensions.Iso10962ToSecurityType(cfi)
将ISO 10962标准中的类型转换为 SecurityTypes 。
- cfi
- 入入出于ISO 10962标准.
返回值: 金融工具类型。
public static bool IsObsolete(Level1Fields field)
result = Extensions.IsObsolete(field)
指定的一级战地是否已经过时 。
- field
- 一级字段值。
返回值: 如果过时,否则,不过时。
public static bool IsObsolete(PositionChangeTypes type)
result = Extensions.IsObsolete(type)
指定的PositionChangeTypes是否由ObsoleteAttribute标出 。
- type
- PositionChangeTypes值 。
返回值: 如果过时,否则,不过时。
public static bool IsOk(IErrorMessage message)
result = Extensions.IsOk(message)
确定答复中是否包含出错。
- message
- IErrorMessage
返回值: 检查结果。
public static bool IsOpened(IMessageChannel channel)
result = Extensions.IsOpened(channel)
频道打开了
- channel
- 消息频道.
返回值: 检查结果。
public static bool IsOrderLogCanceled(ExecutionMessage item)
result = Extensions.IsOrderLogCanceled(item)
要检查,字符串是否包含已取消的命令 。
- item
- 秩序记录项目。
返回值: ,如果字符串包含已取消的顺序,否则,
public static bool IsOrderLogMatched(ExecutionMessage item)
result = Extensions.IsOrderLogMatched(item)
要检查, 字符串是否包含命令匹配 。
- item
- 秩序记录项目。
返回值: ,如果字符串包含命令匹配,否则,
public static bool IsOrderLogRegistered(ExecutionMessage item)
result = Extensions.IsOrderLogRegistered(item)
要检查, 字符串是否包含命令注册 。
- item
- 秩序记录项目。
返回值: ,如果字符串包含命令注册,否则,
public static bool IsPlazaSystem(long status)
result = Extensions.IsPlazaSystem(status)
从比特旗中提取系统属性 。
- status
- 位子旗 (英语).
返回值: 如果命令是系统, 否则,
public static bool IsResultMessageNotSupported(IMessageAdapter adapter, MessageTypes type)
result = Extensions.IsResultMessageNotSupported(adapter, type)
确定指定的消息类型是否包含在 NotSupportedResultMessages 中 。
- adapter
- 适从者.
- type
- 消息类型 。
返回值: 如果指定的消息类型得到支持,则不在此限,
public static bool IsSet(Unit value)
result = Extensions.IsSet(value)
确定数值设定。
- value
- 单位
返回值: 检查结果。
public static bool IsStorageSupported(DataType dataType)
result = Extensions.IsStorageSupported(dataType)
确定存储是否支持指定的数据类型。
- dataType
- DataType
返回值: 检查结果。
public static bool IsSupportSecuritiesLookupAll(IMessageAdapter adapter)
result = Extensions.IsSupportSecuritiesLookupAll(adapter)
支持检查所有金融工具。
- adapter
- 适从者.
返回值: 检查结果。
public static bool IsSupportStopLoss(IMessageAdapter adapter)
result = Extensions.IsSupportStopLoss(adapter)
确定适配器是否支持停止损失命令 。
- adapter
- 适从者.
返回值: 检查结果。
public static bool IsSupportTakeProfit(IMessageAdapter adapter)
result = Extensions.IsSupportTakeProfit(adapter)
确定适配器支持是否接受盈利订单 。
- adapter
- 适从者.
返回值: 检查结果。
public static bool IsSupportWithdraw(IMessageAdapter adapter)
result = Extensions.IsSupportWithdraw(adapter)
确定适配器是否支持撤回命令。
- adapter
- 适从者.
返回值: 检查结果。
public static bool IsToday(DateTime date)
result = Extensions.IsToday(date)
检查指定日期的今天。
- date
- 指定日期 。
返回值: 如果指定的日期是今天,否则,
public static bool IsToday(DateTime? date)
result = Extensions.IsToday(date)
检查指定日期的今天。
- date
- 指定日期 。
返回值: 如果指定的日期是今天,否则,
public static bool IsTransactional(IMessageAdapter adapter)
result = Extensions.IsTransactional(adapter)
是指定的适配器支持交易。
- adapter
- 适从者.
返回值: 检查结果。
public static bool IsWorkingDate(BoardMessage board, DateTime date, bool checkHolidays)
result = Extensions.IsWorkingDate(board, date, checkHolidays)
要检查日期是否交易 。
- board
- 董事会信息.
- date
- 已过日期待查.
- checkHolidays
- 是否检查周一的通过日期(星期六和星期天为休息日,返回的值为 .) 。
返回值: ,如果交易日期,否则不交易。
public static bool IsWorkingTime(BoardMessage board, DateTime time, bool? isWorkingDay, WorkingTimePeriod period)
result = Extensions.IsWorkingTime(board, time, isWorkingDay, period)
要检查时间是否交易( 是否开始、 结束、 是否有清除) 。
- board
- 董事会信息.
- time
- 被检查的时间
- isWorkingDay
- ,如果交易日期,否则不交易。
- period
- 现工作时间。
返回值: ,如果时间被交易,否则,不交易。
public static bool IsWorkingTime(BoardMessage board, DateTime time)
result = Extensions.IsWorkingTime(board, time)
要检查时间是否交易( 是否开始、 结束、 是否有清除) 。
- board
- 董事会信息.
- time
- 被检查的时间
返回值: ,如果时间被交易,否则,不交易。
public static QuoteChangeMessage Join(IOrderBookMessage original, IOrderBookMessage rare)
result = Extensions.Join(original, rare)
将初序书及其鲜有的表述合并.
- original
- 初序书.
- rare
- 稀有的订单本.
返回值: 合并后订书.
public static DateTime LastTradeDay(BoardMessage board, DateTime date, bool checkHolidays)
result = Extensions.LastTradeDay(board, date, checkHolidays)
获得最后的交易日期。
- board
- 董事会信息.
- date
- 开始检查的日期 。
- checkHolidays
- 是否检查周一的通过日期(星期六和星期天为休息日,返回的值为 .) 。
返回值: 上次交易日期。
public static IEnumerable<SecurityMessage> LookupByCode(ISecurityMessageProvider provider, string code, SecurityTypes? type)
result = Extensions.LookupByCode(provider, code, type)
以取出仪相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相
- provider
- 提供各种文书的信息。
- code
- 金融工具代码。
- type
- 金融工具类型。
返回值: 获得的乐器。 如果没有特定标准, 则返回 。
public static IAsyncEnumerable<SecurityMessage> LookupByCodeAsync(ISecurityMessageProvider provider, string code, SecurityTypes? type)
result = Extensions.LookupByCodeAsync(provider, code, type)
以取出仪相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相
- provider
- 提供各种文书的信息。
- code
- 金融工具代码。
- type
- 金融工具类型。
返回值: 获得的乐器。 如果没有特定标准, 则返回 。
public static SecurityMessage LookupMessageById(ISecurityMessageProvider provider, SecurityId id)
result = Extensions.LookupMessageById(provider, id)
以能辨识取出器.
- provider
- ISecurityMessageProvider
- id
- 金融工具标识。
返回值: 获得的乐器。 如果没有特定标准, 则返回 。
public static IEnumerable<SecurityMessage> LookupMessages(ISecurityMessageProvider provider, SecurityLookupMessage criteria)
result = Extensions.LookupMessages(provider, criteria)
以标准为依据的金融工具
- provider
- ISecurityMessageProvider
- criteria
- 信件金融工具查找指定标准 。
返回值: 找到乐器了
public static TMessage LoopBack<TMessage>(TMessage message, IMessageAdapter adapter, MessageBackModes mode)
result = Extensions.LoopBack(message, adapter, mode)
Made the specified message as BackMode.
- message
- 传言.
- adapter
- 适从者.
- mode
- 后起模式.
返回值: 传言.
public static Uri MakeVectorIconUri(string key)
result = Extensions.MakeVectorIconUri(key)
获取图标 UR
public static int? NearestSupportedDepth(IMessageAdapter adapter, int depth)
result = Extensions.NearestSupportedDepth(adapter, depth)
获取指定位置的最近支持深度 。
- adapter
- 适从者.
- depth
- 深处.
返回值: 所支持的深度( 已更新) 。
public static DataType PnF(PnFArg arg)
result = Extensions.PnF(arg)
为 PnFCandleMessage 创建数据类型信息 。
- arg
- 蜡烛取出.
返回值: 数据类型信息.
public static DataType Portfolio(string portfolioName)
result = Extensions.Portfolio(portfolioName)
为 PortfolioMessage 创建数据类型信息 。
- portfolioName
- 组合名.
返回值: 数据类型信息.
public static DataType Range(Unit arg)
result = Extensions.Range(arg)
为 RangeCandleMessage 创建数据类型信息 。
- arg
- 蜡烛取出.
返回值: 数据类型信息.
public static void RegisterCandleType<TArg>(Type messageType, MessageTypes type, string fileName, Func<string, TArg> argParse, Func<TArg, string> argToString, Func<TArg, bool> argValidator, bool isBuildOnly)
Extensions.RegisterCandleType(messageType, type, fileName, argParse, argToString, argValidator, isBuildOnly)
登记新的蜡烛类型。
- messageType
- 烛之通旨之类.
- type
- 消息类型 。
- fileName
- 档案名.
- argParse
- 字符串到转换器 。
- argToString
- 转到字符串转换器。
- argValidator
- 参数验证器 。
- isBuildOnly
- 蜡烛类型只能从基础数据来构建.
public static void RemoveMarketDataSupport(MessageAdapter adapter)
Extensions.RemoveMarketDataSupport(adapter)
从 SupportedInMessages 中移除与市场数据相关的消息类型 。
- adapter
- 适从者.
public static void RemoveNotSupportedResultMessage(MessageAdapter adapter, MessageTypes type)
Extensions.RemoveNotSupportedResultMessage(adapter, type)
从 NotSupportedResultMessages 中删除信件类型 。
- adapter
- 适从者.
- type
- 消息类型 。
public static void RemoveSupportedAllMarketDataTypes(MessageAdapter adapter)
Extensions.RemoveSupportedAllMarketDataTypes(adapter)
从 DateTime} 中删除所有市场数据类型).
- adapter
- 适从者.
public static void RemoveSupportedMarketDataType(MessageAdapter adapter, DataType type)
Extensions.RemoveSupportedMarketDataType(adapter, type)
从 DateTime} 中删除市场数据类型 。
- adapter
- 适从者.
- type
- 市场数据类型.
public static void RemoveSupportedMessage(MessageAdapter adapter, MessageTypes type)
Extensions.RemoveSupportedMessage(adapter, type)
从 PossibleSupportedMessages 中删除信件类型 。
- adapter
- 适从者.
- type
- 消息类型 。
public static void RemoveTransactionalSupport(MessageAdapter adapter)
Extensions.RemoveTransactionalSupport(adapter)
从 & # #SupportedInMessages\ # # 中移除与交易相关的消息类型 。
- adapter
- 适从者.
public static DataType Renko(Unit arg)
result = Extensions.Renko(arg)
为 RenkoCandleMessage 创建数据类型信息 。
- arg
- 蜡烛取出.
返回值: 数据类型信息.
public static Message ReplaceSecurityId(Message message, SecurityId securityId)
result = Extensions.ReplaceSecurityId(message, securityId)
以特定内容取代金融工具编号。
- message
- 传言.
- securityId
- 金融工具标识。
返回值: 传言.
public static long SafeGetOrderId(ExecutionMessage message)
result = Extensions.SafeGetOrderId(message)
如果无法获得信息, 则获取订单标识符, 或者丢弃例外 。
- message
- 行动
返回值: 点出身份证
public static decimal SafeGetVolume(ExecutionMessage message)
result = Extensions.SafeGetVolume(message)
如果无法获得信息, 则获取操作次数, 或者丢弃例外 。
- message
- 行动
返回值: 数量。
public static void SetId<T>(CommandMessage message, T id)
Extensions.SetId(message, id)
设定为%\ObjectId+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- message
- CommandMessage.
- id
- Typed ObjectId.
public static SecurityId SetNativeId(SecurityId secId, object nativeId)
result = Extensions.SetNativeId(secId, nativeId)
初始化土著。
- secId
- 金融工具标识。
- nativeId
- 原生(内部)贸易体系金融工具 id.
返回值: 金融工具标识。
public static void SetSecurityCode(SecurityMessage message, string secCode)
Extensions.SetSecurityCode(message, secCode)
Initialize SecurityCode.
- message
- 包含金融工具信息的信息。
- secCode
- 金融工具代码。
public static void SetSecurityTypes(ISecurityTypesMessage message, SecurityTypes? type, IEnumerable<SecurityTypes> types)
Extensions.SetSecurityTypes(message, type, types)
Initialize SecurityTypes.
- message
- 信件金融工具查找指定标准 。
- type
- 金融工具类型。
- types
- 金融工具类型。
public static TMessage SetSubscriptionIds<TMessage>(TMessage message, long[] subscriptionIds, long subscriptionId)
result = Extensions.SetSubscriptionIds(message, subscriptionIds, subscriptionId)
将订阅标识符设置到指定信件中 。
- message
- 传言.
- subscriptionIds
- 辨相者.
- subscriptionId
- 辨相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相
返回值: 传言.
public static decimal ShrinkPrice(decimal price, decimal? priceStep, int? decimals, ShrinkRules rule)
result = Extensions.ShrinkPrice(price, priceStep, decimals, rule)
以减价为目的,使最低级的步数相乘,也限制逗号后所标出数.
- price
- 价为多所取.
- priceStep
- 价阶.
- decimals
- 昏迷后价格的位数。
- rule
返回值: 多重价钱.
public static decimal ShrinkPrice(decimal price, SecurityMessage secMsg, ShrinkRules rule)
result = Extensions.ShrinkPrice(price, secMsg, rule)
以减价为目的,使最低级的步数相乘,也限制逗号后所标出数.
- price
- 价为多所取.
- secMsg
- SecurityMessage
- rule
返回值: 多重价钱.
public static ValueTuple<QuoteChange[], QuoteChange[]> Sparse(QuoteChange bid, QuoteChange ask, decimal priceRange, decimal? priceStep, int maxDepth)
result = Extensions.Sparse(bid, ask, priceRange, priceStep, maxDepth)
要创建形式对引出一串稀有的引出集,这些引出将包含在对相之间的范围中.
- bid
- 投标。
- ask
- 问.
- priceRange
- 最低价阶.
- priceStep
- 金融工具价格步骤。
- maxDepth
- 最大深度( 最大深度 ).
返回值: 所取引经所取之所取所取之所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所所取所所取所所取所所取所所取所取所所取所所取所所取所所所取所所所所取所取所所取所所所取所所取所取所取所取所所所取所所取所取所所所所取所取所取所取所所所所取所取所取所取所取所取所取所所所取所取所取所所所取所
public static QuoteChange[] Sparse(QuoteChange[] quotes, Sides side, decimal priceRange, decimal? priceStep, int maxDepth)
result = Extensions.Sparse(quotes, side, priceRange, priceStep, maxDepth)
以创出从正例引出之所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所所取所取所取所取所取所取所取所取所取所取所所所所取所取所取所所取所所所取所取所取所取所取所取所取所取所取所取所取所取所取所
- quotes
- 常规引文 集合中应包含相同方向(只出价或只出价)的引文.
- side
- 边.
- priceRange
- 最低价阶.
- priceStep
- 金融工具价格步骤。
- maxDepth
- 最大深度( 最大深度 ).
返回值: 所取引经所取之所取所取之所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所取所所取所所取所所取所所取所所取所取所所取所所取所所取所所所取所所所所取所取所所取所所所取所所取所取所取所取所所所取所所取所取所所所所取所取所取所取所所所所取所取所取所取所取所取所取所所所取所取所取所所所取所
public static QuoteChangeMessage Sparse(IOrderBookMessage depth, decimal priceRange, decimal? priceStep, int maxDepth)
result = Extensions.Sparse(depth, priceRange, priceStep, maxDepth)
从常规订货本上创造出一个稀有的.
- depth
- 常所出定书.
- priceRange
- 最低价阶.
- priceStep
- 金融工具价格步骤。
- maxDepth
- 最大深度( 最大深度 ).
返回值: 稀有的订单本.
public static ValueTuple<string, string> SplitToPair(string symbol)
result = Extensions.SplitToPair(symbol)
分为一对.
- symbol
- 符号。
返回值: 平分 说吧
public static DataType Tick(int arg)
result = Extensions.Tick(arg)
为 TickCandleMessage 创建数据类型信息 。
- arg
- 蜡烛取出.
返回值: 数据类型信息.
public static DataType TimeFrame(TimeSpan tf)
result = Extensions.TimeFrame(tf)
为 TimeFrameCandleMessage 创建数据类型信息 。
- tf
- 蜡烛取出.
返回值: 数据类型信息.
public static Type ToCandleMessage(MessageTypes type)
result = Extensions.ToCandleMessage(type)
铸造蜡烛型号为MessageTypes,
- type
- 蜡烛类型.
返回值: Message type CandleMessage.
public static Type ToCandleMessageType(MessageTypes type)
result = Extensions.ToCandleMessageType(type)
将信件类型 MessageTypes 转换为蜡烛类型 CandleMessage 。
- type
- 消息类型 。
返回值: 蜡烛类型.
public static DataType ToDataType(string type, string arg)
result = Extensions.ToDataType(type, arg)
Convert String to DataType value.
- type
- 类型。
- arg
- 阿尔格
返回值: 数据类型信息.
public static DataType ToDataType(ExecutionTypes type)
result = Extensions.ToDataType(type)
将 ExecutionTypes 转换为 DataType 值 。
- type
- ExecutionTypes.
返回值: DataType.
public static object ToDataTypeArg(Type messageType, string str)
result = Extensions.ToDataTypeArg(messageType, str)
将蜡烛参数的字符串表示转换为模板 。
- messageType
- 烛之通旨之类.
- str
- 辩才之弦表示.
返回值: 辩才相.
public static ErrorMessage ToErrorMessage(Exception error, long originalTransactionId)
result = Extensions.ToErrorMessage(error, originalTransactionId)
Convert error info into ErrorMessage.
- error
- 错误信息 。
- originalTransactionId
- 原始消息的编号 TransactionId,此消息是该消息的响应.
返回值: 错误消息 。
public static ErrorMessage ToErrorMessage(string description)
result = Extensions.ToErrorMessage(description)
将错误的文本消息转换为%\ ErrorMessage\\\\\\ 实例 。
- description
- 错误的短信 。
返回值: ErrorMessage例.
public static ExecutionMessage ToExec(OrderRegisterMessage regMsg)
result = Extensions.ToExec(regMsg)
Convert OrderRegisterMessage to ExecutionMessage.
- regMsg
- 包含订单登记信息的信息.
返回值: 消息中包含执行信息.
public static ExecutionTypes ToExecutionType(DataType type)
result = Extensions.ToExecutionType(type)
将 DataType 转换为 ExecutionTypes 值 。
- type
- DataType.
返回值: ExecutionTypes.
public static MessageTypeInfo ToInfo(MessageTypes type, bool? isMarketData)
result = Extensions.ToInfo(type, isMarketData)
将 MessageTypes 转换为 MessageTypeInfo 值 。
- type
- MessageTypes值 。
- isMarketData
- 市场数据.
返回值: MessageTypeInfo值 。
public static Level1ChangeMessage ToLevel1(IOrderBookMessage message)
result = Extensions.ToLevel1(message)
将 IOrderBookMessage 转换为 Level1ChangeMessage 值 。
- message
- IOrderBookMessage例.
返回值: Level1ChangeMessage例.
public static Level1ChangeMessage ToLevel1(ExecutionMessage message)
result = Extensions.ToLevel1(message)
将 ExecutionMessage 转换为 Level1ChangeMessage 值 。
- message
- ExecutionMessage例.
返回值: Level1ChangeMessage例.
public static IEnumerable<Level1ChangeMessage> ToLevel1(IEnumerable<QuoteChangeMessage> quotes)
result = Extensions.ToLevel1(quotes)
从订书楼里建出一级楼
- quotes
- 令书出.
返回值: 一级
public static IEnumerable<Level1ChangeMessage> ToLevel1(IEnumerable<ExecutionMessage> items, IOrderLogMarketDepthBuilder builder, TimeSpan interval)
result = Extensions.ToLevel1(items, builder, interval)
从订单日志中构建一级.
- items
- 令行通行行经.
- builder
- 订购日志到市场深度建设者.
- interval
- 命令书生成的间隔,默认为零,这意味着命令书生成在命令日志的每个新项上.
返回值: 滴答交易。
public static IAsyncEnumerable<Level1ChangeMessage> ToLevel1(IAsyncEnumerable<QuoteChangeMessage> quotes)
result = Extensions.ToLevel1(quotes)
从订书楼里建出一级楼
- quotes
- 令书出.
返回值: 一级
public static IAsyncEnumerable<Level1ChangeMessage> ToLevel1(IAsyncEnumerable<ExecutionMessage> items, IOrderLogMarketDepthBuilder builder, TimeSpan interval)
result = Extensions.ToLevel1(items, builder, interval)
从订单日志中构建一级.
- items
- 令行通行行经.
- builder
- 订购日志到市场深度建设者.
- interval
- 命令书生成的间隔,默认为零,这意味着命令书生成在命令日志的每个新项上.
返回值: 滴答交易。
public static Level1ChangeMessage ToLevel1(CandleMessage message)
result = Extensions.ToLevel1(message)
将 CandleMessage 转换为 Level1ChangeMessage 值 。
- message
- CandleMessage例.
返回值: Level1ChangeMessage例.
public static Message ToMessage(ConnectionStates state)
result = Extensions.ToMessage(state)
Convert ConnectionStates to Message.
- state
- ConnectionStates值 。
返回值: 消息值.
public static MessageTypes ToMessageType(Type type)
result = Extensions.ToMessageType(type)
Convert Type to MessageTypes value.
- type
- 类型值。
返回值: MessageTypes值 。
public static Type ToMessageType(MessageTypes type)
result = Extensions.ToMessageType(type)
Convert MessageTypes to Type value.
- type
- MessageTypes值 。
返回值: 类型值。
public static MessageTypes ToMessageType(string str)
result = Extensions.ToMessageType(str)
Convert String into MessageTypes.
- str
- 字符串
返回值: MessageTypes
public static MessageTypes ToMessageType2(DataType type)
result = Extensions.ToMessageType2(type)
Convert DataType to MessageTypes value.
- type
- DataType值 。
返回值: 消息类型 。
public static string ToMicexCurrencyName(CurrencyTypes type)
result = Extensions.ToMicexCurrencyName(type)
要将货币类型转换为MICEX格式的名称.
- type
- 货币类型.
返回值: MICEX格式的货币名称.
public static SecurityId ToNullableSecurityId(string id, SecurityIdGenerator generator)
result = Extensions.ToNullableSecurityId(id, generator)
Convert String to SecurityId value.
- id
- 字符串值 。
- generator
- 仪器识别器生成器 SecurityId。可以是 。
返回值: SecurityId值 。
public static IEnumerable<QuoteChangeMessage> ToOrderBooks(IEnumerable<Level1ChangeMessage> level1)
result = Extensions.ToOrderBooks(level1)
将一级数据转换成订购簿。
- level1
- 1级数据.
返回值: 市场深度.
public static IAsyncEnumerable<QuoteChangeMessage> ToOrderBooks(IAsyncEnumerable<Level1ChangeMessage> level1)
result = Extensions.ToOrderBooks(level1)
将一级数据转换成订购簿。
- level1
- 1级数据.
返回值: 市场深度.
public static IAsyncEnumerable<QuoteChangeMessage> ToOrderBooks(IAsyncEnumerable<ExecutionMessage> items, IOrderLogMarketDepthBuilder builder, TimeSpan interval, int maxDepth)
result = Extensions.ToOrderBooks(items, builder, interval, maxDepth)
从订单日志中构建市场深度.
- items
- 令行通行行经.
- builder
- 订购日志到市场深度建设者.
- interval
- 命令书生成的间隔,默认为零,这意味着命令书生成在命令日志的每个新项上.
- maxDepth
- 命令书的最大深度。 默认是 MaxValue, 这意味着无穷的深度 。
返回值: 市场深度.
public static IEnumerable<QuoteChangeMessage> ToOrderBooks(IEnumerable<ExecutionMessage> items, IOrderLogMarketDepthBuilder builder, TimeSpan interval, int maxDepth)
result = Extensions.ToOrderBooks(items, builder, interval, maxDepth)
从订单日志中构建市场深度.
- items
- 令行通行行经.
- builder
- 订购日志到市场深度建设者.
- interval
- 命令书生成的间隔,默认为零,这意味着命令书生成在命令日志的每个新项上.
- maxDepth
- 命令书的最大深度。 默认是 MaxValue, 这意味着无穷的深度 。
返回值: 市场深度.
public static ExecutionMessage ToOrderSnapshot(IEnumerable<ExecutionMessage> diffs, long transactionId, ILogReceiver logs)
result = Extensions.ToOrderSnapshot(diffs, transactionId, logs)
将命令更改转换为最后快照 。
- diffs
- 变化.
- transactionId
- 交易身份证明。
- logs
- 日志 记录
返回值: 即时快照.
public static string ToReadableString(DataType dt)
result = Extensions.ToReadableString(dt)
Convert DataType to readable string.
- dt
- DataType例.
返回值: 可读字符串.
public static OrderRegisterMessage ToReg(ExecutionMessage execMsg)
result = Extensions.ToReg(execMsg)
Convert ExecutionMessage to OrderRegisterMessage.
- execMsg
- 消息中包含执行信息.
返回值: 包含订单登记信息的信息.
public static SecurityId ToSecurityId(string id, SecurityIdGenerator generator)
result = Extensions.ToSecurityId(id, generator)
Convert String to SecurityId value.
- id
- 字符串值 。
- generator
- 仪器识别器生成器 SecurityId。可以是 。
返回值: SecurityId值 。
public static string ToStringId(SecurityId securityId, SecurityIdGenerator generator, bool nullIfEmpty)
result = Extensions.ToStringId(securityId, generator, nullIfEmpty)
Convert SecurityId to SecurityId value.
- securityId
- SecurityId值 。
- generator
- 仪器识别器生成器 SecurityId。可以是 。
- nullIfEmpty
- Return if SecurityId is empty.
返回值: SecurityId值 。
public static ExecutionMessage ToTick(ExecutionMessage item)
result = Extensions.ToTick(item)
将订单日志中的交易勾选。
- item
- 秩序记录项目。
返回值: 滴答交易 滴答交易 滴答交易 滴答交易 滴答交易 滴答交易 滴答交易 滴答交易 滴答交易 滴答交易 滴答交易 滴答交易 滴答交易 滴答交易 滴答交易 滴答交易 滴答交易 滴答交易 滴答交易 滴答交易 滴答交易 滴答交易 滴答交易 滴答交易 滴答交易 滴答交易 滴答交易 滴答交易 滴答交易 滴答交易 滴答交易 滴答交易 滴答交易 滴滴滴滴
public static ExecutionMessage ToTick(Level1ChangeMessage level1)
result = Extensions.ToTick(level1)
将一级数据转换为勾选数据。
- level1
- 1级数据.
返回值: 滴入数据.
public static IAsyncEnumerable<ExecutionMessage> ToTicks(IAsyncEnumerable<Level1ChangeMessage> level1)
result = Extensions.ToTicks(level1)
将一级数据转换为勾选数据。
- level1
- 1级数据.
返回值: 滴入数据.
public static IAsyncEnumerable<ExecutionMessage> ToTicks(IAsyncEnumerable<ExecutionMessage> items)
result = Extensions.ToTicks(items)
以建立订单日志中的勾选交易.
- items
- 令行通行行经.
返回值: 滴答交易。
public static IEnumerable<ExecutionMessage> ToTicks(IEnumerable<ExecutionMessage> items)
result = Extensions.ToTicks(items)
以建立订单日志中的勾选交易.
- items
- 令行通行行经.
返回值: 滴答交易。
public static IEnumerable<ExecutionMessage> ToTicks(IEnumerable<Level1ChangeMessage> level1)
result = Extensions.ToTicks(level1)
将一级数据转换为勾选数据。
- level1
- 1级数据.
返回值: 滴入数据.
public static Type ToType(PositionChangeTypes type)
result = Extensions.ToType(type)
将 PositionChangeTypes 转换为类型值 。
- type
- PositionChangeTypes值 。
返回值: 类型值。
public static Type ToType(Level1Fields field)
result = Extensions.ToType(field)
将一级字段转换为类型值。
- field
- 一级字段值。
返回值: 类型值。
public static QuoteChangeMessage Truncate(IOrderBookMessage depth, int maxDepth)
result = Extensions.Truncate(depth, maxDepth)
按最大深度值将指定的顺序书排出。
- depth
- 令书.
- maxDepth
- 订单书的最大深度.
返回值: 短序书.
public static TMessage TryAdd<TMessage, TChange>(TMessage message, TChange type, int? value, bool isZeroAcceptable)
result = Extensions.TryAdd(message, type, value, isZeroAcceptable)
添加到收藏中的更改,如果值是 0 和 。
- message
- 换发消息
- type
- 换个类型
- value
- 变化值.
- isZeroAcceptable
- 是零值是可接受的值。
返回值: 换发消息
public static TMessage TryAdd<TMessage, TChange>(TMessage message, TChange type, string value)
result = Extensions.TryAdd(message, type, value)
将一个更改添加到收藏中,如果值是 .
- message
- 换发消息
- type
- 换个类型
- value
- 变化值.
返回值: 换发消息
public static TMessage TryAdd<TMessage, TChange>(TMessage message, TChange type, int value, bool isZeroAcceptable)
result = Extensions.TryAdd(message, type, value, isZeroAcceptable)
将一个更改添加到收藏中,如果数值是 0 以外的。
- message
- 换发消息
- type
- 换个类型
- value
- 变化值.
- isZeroAcceptable
- 是零值是可接受的值。
返回值: 换发消息
public static TMessage TryAdd<TMessage, TChange>(TMessage message, TChange type, decimal? value, bool isZeroAcceptable)
result = Extensions.TryAdd(message, type, value, isZeroAcceptable)
添加到收藏中的更改,如果值是 0 和 。
- message
- 换发消息
- type
- 换个类型
- value
- 变化值.
- isZeroAcceptable
- 是零值是可接受的值。
返回值: 换发消息
public static TMessage TryAdd<TMessage, TChange>(TMessage message, TChange type, decimal value, bool isZeroAcceptable)
result = Extensions.TryAdd(message, type, value, isZeroAcceptable)
将一个更改添加到收藏中,如果数值是 0 以外的。
- message
- 换发消息
- type
- 换个类型
- value
- 变化值.
- isZeroAcceptable
- 是零值是可接受的值。
返回值: 换发消息
public static TMessage TryAdd<TMessage, TChange>(TMessage message, TChange type, bool? value)
result = Extensions.TryAdd(message, type, value)
将一个更改添加到收藏中,如果值是 .
- message
- 换发消息
- type
- 换个类型
- value
- 变化值.
返回值: 换发消息
public static TMessage TryAdd<TMessage, TChange>(TMessage message, TChange type, DateTime? value)
result = Extensions.TryAdd(message, type, value)
将一个更改添加到收藏中,如果值是 .
- message
- 换发消息
- type
- 换个类型
- value
- 变化值.
返回值: 换发消息
public static TMessage TryAdd<TMessage, TChange>(TMessage message, TChange type, PortfolioStates? value)
result = Extensions.TryAdd(message, type, value)
将一个更改添加到收藏中,如果值是 .
- message
- 换发消息
- type
- 换个类型
- value
- 变化值.
返回值: 换发消息
public static TMessage TryAdd<TMessage, TChange>(TMessage message, TChange type, CurrencyTypes? value)
result = Extensions.TryAdd(message, type, value)
将一个更改添加到收藏中,如果值是 .
- message
- 换发消息
- type
- 换个类型
- value
- 变化值.
返回值: 换发消息
public static TMessage TryAdd<TMessage, TChange>(TMessage message, TChange type, SecurityStates? value)
result = Extensions.TryAdd(message, type, value)
将一个更改添加到收藏中,如果值是 .
- message
- 换发消息
- type
- 换个类型
- value
- 变化值.
返回值: 换发消息
public static TMessage TryAdd<TMessage, TChange>(TMessage message, TChange type, Sides? value)
result = Extensions.TryAdd(message, type, value)
将一个更改添加到收藏中,如果值是 .
- message
- 换发消息
- type
- 换个类型
- value
- 变化值.
返回值: 换发消息
public static TMessage TryAdd<TMessage, TChange>(TMessage message, TChange type, long? value, bool isZeroAcceptable)
result = Extensions.TryAdd(message, type, value, isZeroAcceptable)
添加到收藏中的更改,如果值是 0 和 。
- message
- 换发消息
- type
- 换个类型
- value
- 变化值.
- isZeroAcceptable
- 是零值是可接受的值。
返回值: 换发消息
public static TMessage TryAdd<TMessage, TChange>(TMessage message, TChange type, long value, bool isZeroAcceptable)
result = Extensions.TryAdd(message, type, value, isZeroAcceptable)
将一个更改添加到收藏中,如果数值是 0 以外的。
- message
- 换发消息
- type
- 换个类型
- value
- 变化值.
- isZeroAcceptable
- 是零值是可接受的值。
返回值: 换发消息
public static SecurityMessage TryFillUnderlyingId(SecurityMessage secMsg, string underlyingCode)
result = Extensions.TryFillUnderlyingId(secMsg, underlyingCode)
Fill UnderlyingSecurityId property.
- secMsg
- SecurityMessage
- underlyingCode
- 地下资产 id.
返回值: SecurityMessage
public static string TryGet(IDictionary<string, string> parameters, string name, string defaultValue)
result = Extensions.TryGet(parameters, name, defaultValue)
- parameters
- name
- defaultValue
public static decimal? TryGetDecimal<TMessage, TChange>(TMessage message, TChange type)
result = Extensions.TryGetDecimal(message, type)
试着从消息中获取更改。
- message
- 换发消息
- type
- 换个类型
返回值: 变化值.
public static Uri TryGetIconUrl(Type type)
result = Extensions.TryGetIconUrl(type)
- type
返回值: 图标 URL.
public static SecurityId? TryGetSecurityId(Message message)
result = Extensions.TryGetSecurityId(message)
尝试从指定消息中获取金融工具标识 。
- message
- 传言.
返回值: 金融工具标识或信息不提供该标识。
public static bool TryGetServerTime(Message message, DateTime serverTime)
result = Extensions.TryGetServerTime(message, serverTime)
尝试获取消息服务器时间 。
- message
- 传言.
- serverTime
- 服务器时间。 如果值是 , 信件中不包含服务器时间 。
返回值: 操作结果。
public static Uri TryGetVectorIcon(Type type)
result = Extensions.TryGetVectorIcon(type)
试着找到图标路径 。
- type
- 具有应用的 VectorIconAttribute 组件类型 。
返回值: 图标 URL.
public static object TryGet<TMessage, TChange>(TMessage message, TChange type)
result = Extensions.TryGet(message, type)
试着从消息中获取更改。
- message
- 换发消息
- type
- 换个类型
返回值: 变化值.
public static void TryInitLocalTime(Message message, ILogSource source)
Extensions.TryInitLocalTime(message, source)
尝试初始化 LocalTime 由 CurrentTime 。
- message
- 传言.
- source
- 来源.
public static IEnumerable<T> TryLimitByCount<T>(IEnumerable<T> set, SecurityLookupMessage msg)
result = Extensions.TryLimitByCount(set, msg)
- set
- msg
public static TAdapter TryRemoveWrapper<TAdapter>(IMessageAdapter adapter)
result = Extensions.TryRemoveWrapper(adapter)
按指定类型删除适配器。
- adapter
- 适从者.
返回值: 已删除适配器或 。
public static TMessage UndoBack<TMessage>(TMessage message)
result = Extensions.UndoBack(message)
取消通过 MessageBackModes 进行的操作 。
- message
- 传言.
返回值: 传言.
public static QuoteChangeMessage UnGroup(IOrderBookMessage depth)
result = Extensions.UnGroup(depth)
要解析顺序书组,使用十进制方法进行分组.
- depth
- 被分组的订单本.
返回值: 已分出分出之令书.
public static bool UseChannels(IMessageAdapter adapter)
result = Extensions.UseChannels(adapter)
要检查, 消息适配器是否使用频道 。
- adapter
- IMessageAdapter
返回值: 检查结果。
public static MarketDataMessage ValidateBounds(MarketDataMessage message)
result = Extensions.ValidateBounds(message)
验证从和到值。
- message
- 传言.
返回值: 传言.
public static bool ValidateCandleArg(Type candleMessageType, object value)
result = Extensions.ValidateCandleArg(candleMessageType, value)
验证蜡烛的参数 。
- candleMessageType
- 蜡烛信息类型 。
- value
- 蜡烛取出.
返回值: 检查结果。
public static bool ValidateChannelState(ChannelStates currState, ChannelStates newState)
result = Extensions.ValidateChannelState(currState, newState)
验证状态变化.
- currState
- 现相相相.
- newState
- 新州 (新州).
public static bool Verify(IOrderBookMessage book)
result = Extensions.Verify(book)
以定定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出定出正出正出正出正出正出正出正出正出正出正出正出正出正出正出正出正出正出正出正出正出正出正出正出正出正出正出正出正出正出正出正出正出正出正出正出正出正出正出正出正出正出正出正出正出正出正出正出正
- book
- 令书.
返回值: ,如果订单书中包含正确的数据,否则。
public static bool VerifyOrderState(OrderStates? currState, OrderStates newState, long transactionId, ILogReceiver logs, bool throwOnInvalid)
result = Extensions.VerifyOrderState(currState, newState, transactionId, logs, throwOnInvalid)
请检查access-OrderStates-X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- currState
- 现序所出之相.
- newState
- 新州 (新州).
- transactionId
- 交易编号。
- logs
- 日志 记录
- throwOnInvalid
- 向无效的转换丢出例外 。
返回值: 检查结果。
public static DataType Volume(decimal arg)
result = Extensions.Volume(arg)
为 VolumeCandleMessage 创建数据类型信息 。
- arg
- 蜡烛取出.
返回值: 数据类型信息.
字段
public static readonly string AllSecurityId
value = Extensions.AllSecurityId
"所有金融工具"id.
public const string AnonymousPortfolioName
value = Extensions.AnonymousPortfolioName
匿名账户。
public static readonly IEnumerable<int> AnyDepths
value = Extensions.AnyDepths
特殊集指SupportedOrderBookDepths选项的任何深度.
public static readonly IFileSystem DefaultFileSystem
value = Extensions.DefaultFileSystem
Default IFileSystem.
public static readonly SecurityLookupMessage LookupAllCriteriaMessage
value = Extensions.LookupAllCriteriaMessage
检查所有金融工具预先确定的标准。
public const string NewsStockSharpSource
value = Extensions.NewsStockSharpSource
StockSharp news source.
public const string SimulatorPortfolioName
value = Extensions.SimulatorPortfolioName
模拟器.