IParentChildMap

StockSharp.Algo.Basket

映射父母订阅儿童订阅ID(用于多适应器路由).

方法

AddMapping
public void AddMapping(long childId, ISubscriptionMessage parentMsg, IMessageAdapter adapter)
iParentChildMap.AddMapping(childId, parentMsg, adapter)

添加父子映射 。

childId
儿童订阅身份证.
parentMsg
父母订阅消息.
adapter
给这个孩子分配的适配器.
Clear
public void Clear()
iParentChildMap.Clear()

清除所有绘图

GetChild
public IDictionary<long, IMessageAdapter> GetChild(long parentId)
result = iParentChildMap.GetChild(parentId)

获取所有活动的孩子订阅 。

parentId
父母订阅身份证明.

返回值: childId –适配器词典.

ProcessChildFinish
public long? ProcessChildFinish(long childId, bool needParentResponse)
result = iParentChildMap.ProcessChildFinish(childId, needParentResponse)

处理一个孩子订阅完成 。

childId
儿童订阅身份证.
needParentResponse
是否应该为父母发送回复 。

返回值: 父母订阅身份, 如果找不到, 则无效 。

ProcessChildOnline
public long? ProcessChildOnline(long childId, bool needParentResponse)
result = iParentChildMap.ProcessChildOnline(childId, needParentResponse)

处理儿童网上订阅通知。

childId
儿童订阅身份证.
needParentResponse
是否应该为父母发送回复 。

返回值: 父母订阅身份, 如果找不到, 则无效 。

ProcessChildResponse
public long? ProcessChildResponse(long childId, Exception error, bool needParentResponse, bool allError, IEnumerable<Exception> innerErrors)
result = iParentChildMap.ProcessChildResponse(childId, error, needParentResponse, allError, innerErrors)

处理儿童订阅回复。

childId
儿童订阅身份证.
error
错误( 如果有的话) 。
needParentResponse
是否应该为父母发送回复 。
allError
是否所有的孩子都有错误.
innerErrors
所有收集的错误。

返回值: 父母订阅身份, 如果找不到, 则无效 。

RemoveMapping
public bool RemoveMapping(long childId)
result = iParentChildMap.RemoveMapping(childId)

删除儿童映射 。

childId
儿童订阅ID要删除 。

返回值: 。 如果删除。

RemoveMappings
public int RemoveMappings(long parentId)
result = iParentChildMap.RemoveMappings(parentId)

删除指定父目录的全部子图 。

parentId
父母订阅身份证明.

返回值: 已删除的映射数 。

TryGetParent
public bool TryGetParent(long childId, long parentId)
result = iParentChildMap.TryGetParent(childId, parentId)

试着获得孩子的家长身份

childId
儿童订阅身份证.
parentId
找到父母订阅 ID 。

返回值: 如果找到的话。