AdapterConnectionState
StockSharp.Algo.Basket
IAdapterConnectionState的默认执行.
属性
AllDisconnectedOrFailed
public bool AllDisconnectedOrFailed { get; }
value = adapterConnectionState.AllDisconnectedOrFailed
是否所有适配器已断开或失败 。
ConnectedCount
public int ConnectedCount { get; }
value = adapterConnectionState.ConnectedCount
获得连接适配器的计数 。
CurrentState
public ConnectionStates CurrentState { get; set; }
value = adapterConnectionState.CurrentState
adapterConnectionState.CurrentState = value
获得当前总和连接状态。
HasPendingAdapters
public bool HasPendingAdapters { get; }
value = adapterConnectionState.HasPendingAdapters
是否有适配器仍在连接中 。
方法
GetAllStates
public IEnumerable<ValueTuple<IMessageAdapter, ConnectionStates, Exception>> GetAllStates()
result = adapterConnectionState.GetAllStates()
获得所有适配状态.
GetErrors
public Exception[] GetErrors()
result = adapterConnectionState.GetErrors()
获取适配状态的所有非无效错误 。
RemoveAdapter
public bool RemoveAdapter(IMessageAdapter adapter)
result = adapterConnectionState.RemoveAdapter(adapter)
删除指定的适配器的状态。
SetAdapterState
public void SetAdapterState(IMessageAdapter adapter, ConnectionStates state, Exception error)
adapterConnectionState.SetAdapterState(adapter, state, error)
设置指定的适配器状态。
TryGetAdapterState
public bool TryGetAdapterState(IMessageAdapter adapter, ConnectionStates state, Exception error)
result = adapterConnectionState.TryGetAdapterState(adapter, state, error)
尝试为指定的适配器获取状态 。