Table of Contents

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>
IPersistable
ICloneable<IMessageChannel>
Inherited Members
Extension Methods

Constructors

ConnectorHydraTask()

public ConnectorHydraTask()

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

bool

CandlesBuildFrom

Поддерживаемые источники данных построения свечей.

public override IEnumerable<Level1Fields> CandlesBuildFrom { get; }

Property Value

IEnumerable<Level1Fields>

IsDownloadNews

Скачивать новости.

[Display(ResourceType = typeof(LocalizedStrings), Name = "News", Description = "DownloadNews", GroupName = "General", Order = 10)]
public bool IsDownloadNews { get; set; }

Property Value

bool

IsStub

Determines the source is stub.

public override bool IsStub { get; }

Property Value

bool

SecurityLookupSupportType

Тип поиска инструмента.

public override SecurityLookupSupportTypes SecurityLookupSupportType { get; }

Property Value

SecurityLookupSupportTypes

SupportedDataTypes

Поддерживаемые типы данных.

public override IEnumerable<DataType> SupportedDataTypes { get; }

Property Value

IEnumerable<DataType>

SupportedDepths

Supported depths.

public override IEnumerable<int> SupportedDepths { get; }

Property Value

IEnumerable<int>

UpdateSecurities

Обновлять инструменты при подключении.

[Display(ResourceType = typeof(LocalizedStrings), Name = "UpdateSecurities", Description = "UpdateSecuritiesOnConnect", GroupName = "General", Order = 11)]
public bool UpdateSecurities { get; set; }

Property Value

bool

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 DataType

Data type info.

Returns

bool

Check result.

Load(SettingsStorage)

Load settings.

public override void Load(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings 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 ISecurityStorage

Securities meta info storage.

criteria SecurityLookupMessage

Message 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 SettingsStorage

Settings storage.

StopSubscription(Security, DataType)

Stop subscription for the specified Security and DataType.

protected override void StopSubscription(Security security, DataType dataType)

Parameters

security Security

Security

dataType DataType

DataType

TestConnect(Action<Exception>)

Verify connection.

public override void TestConnect(Action<Exception> connectionChanged)

Parameters

connectionChanged Action<Exception>

Connection changed callback.