AdapterConnectionState
StockSharp.Algo.Basket
Default implementation of IAdapterConnectionState.
Implements: IAdapterConnectionState
Properties
AllDisconnectedOrFailed
public bool AllDisconnectedOrFailed { get; }
value = adapterConnectionState.AllDisconnectedOrFailed
Whether all adapters are Disconnected or Failed.
AllFailed
public bool AllFailed { get; }
value = adapterConnectionState.AllFailed
Whether all adapters are in Failed state.
ConnectedCount
public int ConnectedCount { get; }
value = adapterConnectionState.ConnectedCount
Gets the count of connected adapters.
CurrentState
public ConnectionStates CurrentState { get; set; }
value = adapterConnectionState.CurrentState
adapterConnectionState.CurrentState = value
Gets or sets the aggregated basket connection state.
HasPendingAdapters
public bool HasPendingAdapters { get; }
value = adapterConnectionState.HasPendingAdapters
Whether any adapter is still in Connecting state.
TotalCount
public int TotalCount { get; }
value = adapterConnectionState.TotalCount
Gets the total count of adapters.
Methods
Clear
public void Clear()
adapterConnectionState.Clear()
Clears all adapter states and resets current state to Disconnected.
GetAllStates
public IEnumerable<ValueTuple<IMessageAdapter, ConnectionStates, Exception>> GetAllStates()
result = adapterConnectionState.GetAllStates()
Gets all adapter states.
GetErrors
public Exception[] GetErrors()
result = adapterConnectionState.GetErrors()
Get all non-null errors from adapter states.
RemoveAdapter
public bool RemoveAdapter(IMessageAdapter adapter)
result = adapterConnectionState.RemoveAdapter(adapter)
Removes the state for the specified adapter.
SetAdapterState
public void SetAdapterState(IMessageAdapter adapter, ConnectionStates state, Exception error)
adapterConnectionState.SetAdapterState(adapter, state, error)
Sets the state for the specified adapter.
TryGetAdapterState
public bool TryGetAdapterState(IMessageAdapter adapter, ConnectionStates state, Exception error)
result = adapterConnectionState.TryGetAdapterState(adapter, state, error)
Tries to get the state for the specified adapter.