Class ConnectorHydraTask<TMessageAdapter>
- Namespace
- StockSharp.Hydra.Core
- Assembly
- StockSharp.Hydra.Core.dll
Базовый источник, работающий через 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
TMessageAdapter
Тип подключения.
- Inheritance
-
ConnectorHydraTask<TMessageAdapter>
- Implements
-
ICloneable<IHydraTask>IPersistableICloneable<IMessageChannel>
- Inherited Members
- Extension Methods
Constructors
ConnectorHydraTask(Hydra)
Создать ConnectorHydraTask<TMessageAdapter>.
public ConnectorHydraTask(Hydra hydra)
Parameters
Properties
Adapter
Адаптер сообщений.
[Display(ResourceType = typeof(LocalizedStrings), Name = "Connection", Description = "ConnectionSettings", GroupName = "General", Order = 0)]
[TypeConverter(typeof(ExpandableObjectConverter))]
public TMessageAdapter Adapter { get; }
Property Value
- TMessageAdapter
CanTestConnect
Можно ли вызвать метод TestConnect(Action<Exception>).
public override bool CanTestConnect { get; }
Property Value
CandlesBuildFrom
Поддерживаемые источники данных построения свечей.
public override IEnumerable<Level1Fields> CandlesBuildFrom { get; }
Property Value
IsDownloadNews
Скачивать новости.
[Display(ResourceType = typeof(LocalizedStrings), Name = "News", Description = "DownloadNews", GroupName = "General", Order = 10)]
public bool IsDownloadNews { get; set; }
Property Value
SecurityLookupSupportType
Тип поиска инструмента.
public override SecurityLookupSupportTypes SecurityLookupSupportType { get; }
Property Value
SupportedDataTypes
Поддерживаемые типы данных.
public override IEnumerable<DataType> SupportedDataTypes { get; }
Property Value
SupportedDepths
Supported depths.
public override IEnumerable<int> SupportedDepths { get; }
Property Value
UpdateSecurities
Обновлять инструменты при подключении.
[Display(ResourceType = typeof(LocalizedStrings), Name = "UpdateSecurities", Description = "UpdateSecuritiesOnConnect", GroupName = "General", Order = 11)]
public bool UpdateSecurities { get; set; }
Property Value
Methods
DisposeManaged()
Освободить занятые ресурсы.
protected override void DisposeManaged()
FinalizeTask()
Обработка окончания работы задачи.
protected override void FinalizeTask()
IsAllDownloadingSupported(DataType)
Is for the specified dataType
all securities downloading enabled.
public override bool IsAllDownloadingSupported(DataType dataType)
Parameters
dataType
DataTypeData type info.
Returns
- bool
Check result.
Load(SettingsStorage)
Load settings.
public override void Load(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings storage.
OnProcess()
Выполнить задачу.
protected override TimeSpan OnProcess()
Returns
- TimeSpan
Минимальный интервал, после окончания которого необходимо снова выполнить задачу.
OnStarting()
Действие при запуске загрузки данных.
protected override void OnStarting()
OnStopped()
Действие при остановке загрузки данных.
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
securityStorage
ISecurityStorageSecurities meta info storage.
criteria
SecurityLookupMessageMessage security lookup for specified criteria.
newSecurity
Action<Security>The handler through which a new instrument will be passed.
lookupError
Action<Exception>Lookup error handler.
isCancelled
Func<bool>The handler which returns an attribute of search cancel.
Save(SettingsStorage)
Save settings.
public override void Save(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings 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)