Table of Contents

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

TMessageAdapter

Connection 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

hydra Hydra

Hydra 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

public override bool CanTestConnect { get; }

Property Value

bool

CandlesBuildFrom

Supported Level1 fields that can be used as candles build source.

public override IEnumerable<Level1Fields> CandlesBuildFrom { get; }

Property Value

IEnumerable<Level1Fields>

IsDownloadNews

Download news.

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

Property Value

bool

SecurityLookupSupportType

Security lookup support type.

public override SecurityLookupSupportTypes SecurityLookupSupportType { get; }

Property Value

SecurityLookupSupportTypes

SupportedDataTypes

Supported data types.

public override IEnumerable<DataType> SupportedDataTypes { get; }

Property Value

IEnumerable<DataType>

SupportedDepths

Supported order book depths.

public override IEnumerable<int> SupportedDepths { get; }

Property Value

IEnumerable<int>

UpdateSecurities

Update securities on connect.

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

Property Value

bool

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

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()

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

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 returning whether to cancel the search.

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.