Class ConnectorHydraTask<TMessageAdapter>
- Namespace
- StockSharp.Hydra.Core
- Assembly
- StockSharp.Hydra.Core.dll
Base source that works via IMessageAdapter.
public class ConnectorHydraTask<TMessageAdapter> : BaseHydraTask, IHydraTask, ILogReceiver, ILogSource, ICloneable<IHydraTask>, IPersistable, INotifyPropertyChanged, IScheduledTask, IMessageChannel, IDisposable, ICloneable<IMessageChannel>, ICloneable, IConnectorHydraTask where TMessageAdapter : class, IMessageAdapter
Type Parameters
TMessageAdapterConnection adapter type.
- Inheritance
-
ConnectorHydraTask<TMessageAdapter>
- Implements
- Inherited Members
- Extension Methods
Constructors
ConnectorHydraTask(Hydra)
Initializes a new instance of the ConnectorHydraTask<TMessageAdapter> class.
public ConnectorHydraTask(Hydra hydra)
Parameters
hydraHydraHydra instance.
Properties
Adapter
Message adapter.
[Display(ResourceType = typeof(LocalizedStrings), Name = "Connection", Description = "ConnectionSettings", GroupName = "General", Order = 0)]
[TypeConverter(typeof(ExpandableObjectConverter))]
[BasicSetting]
public TMessageAdapter Adapter { get; }
Property Value
- TMessageAdapter
CanTestConnect
Can TestConnect(Action<Exception>) be called.
public override bool CanTestConnect { get; }
Property Value
CandlesBuildFrom
Supported Level1 fields that can be used as candles build source.
public override IEnumerable<Level1Fields> CandlesBuildFrom { get; }
Property Value
IsDownloadNews
Download news.
[Display(ResourceType = typeof(LocalizedStrings), Name = "News", Description = "DownloadNews", GroupName = "General", Order = 10)]
public bool IsDownloadNews { get; set; }
Property Value
SecurityLookupSupportType
Security lookup support type.
public override SecurityLookupSupportTypes SecurityLookupSupportType { get; }
Property Value
SupportedDataTypes
Supported data types.
public override IEnumerable<DataType> SupportedDataTypes { get; }
Property Value
SupportedDepths
Supported order book depths.
public override IEnumerable<int> SupportedDepths { get; }
Property Value
UpdateSecurities
Update securities on connect.
[Display(ResourceType = typeof(LocalizedStrings), Name = "UpdateSecurities", Description = "UpdateSecuritiesOnConnect", GroupName = "General", Order = 11)]
public bool UpdateSecurities { get; set; }
Property Value
Methods
DisposeManaged()
Disposes the managed resources. Override this method to add custom clean up of managed resources.
protected override void DisposeManaged()
FinalizeTask()
Handle task finalization.
protected override void FinalizeTask()
IsAllDownloadingSupported(DataType)
Determines whether downloading for all securities is supported for the specified dataType.
public override bool IsAllDownloadingSupported(DataType dataType)
Parameters
dataTypeDataTypeData type info.
Returns
- bool
Check result.
Load(SettingsStorage)
Load settings.
public override void Load(SettingsStorage storage)
Parameters
storageSettingsStorageSettings storage.
OnProcess()
Perform task work.
protected override TimeSpan OnProcess()
Returns
- TimeSpan
The minimum interval after which the task should run again.
OnStarting()
Action on starting the data loading.
protected override void OnStarting()
OnStopped()
Action on stopping the data loading.
protected override void OnStopped()
Refresh(ISecurityStorage, SecurityLookupMessage, Action<Security>, Action<Exception>, Func<bool>)
Download new securities.
public override void Refresh(ISecurityStorage securityStorage, SecurityLookupMessage criteria, Action<Security> newSecurity, Action<Exception> lookupError, Func<bool> isCancelled)
Parameters
securityStorageISecurityStorageSecurities meta info storage.
criteriaSecurityLookupMessageMessage security lookup for specified criteria.
newSecurityAction<Security>The handler through which a new instrument will be passed.
lookupErrorAction<Exception>Lookup error handler.
isCancelledFunc<bool>The handler returning whether to cancel the search.
Save(SettingsStorage)
Save settings.
public override void Save(SettingsStorage storage)
Parameters
storageSettingsStorageSettings storage.
StopSubscription(Security, DataType)
protected override void StopSubscription(Security security, DataType dataType)
Parameters
TestConnect(Action<Exception>)
Verify connection.
public override void TestConnect(Action<Exception> connectionChanged)