LocalMarketDataDrive

StockSharp.Algo.Storages

Die Dateispeicherung für Marktdaten.

Erbt von: BaseMarketDataDrive

Konstruktoren

LocalMarketDataDrive
public LocalMarketDataDrive(IFileSystem fileSystem, string path)
localMarketDataDrive = LocalMarketDataDrive(fileSystem, path)

Initialisiert eine neue Instanz von LocalMarketDataDrive.

fileSystem
Abstraktion des Dateisystems.
path
Der Pfad zum Verzeichnis mit Daten.
LocalMarketDataDrive
public LocalMarketDataDrive(string path)
localMarketDataDrive = LocalMarketDataDrive(path)

Initialisiert eine neue Instanz von LocalMarketDataDrive.

path
Der Pfad zum Verzeichnis mit Daten.
LocalMarketDataDrive
public LocalMarketDataDrive()
localMarketDataDrive = LocalMarketDataDrive()

Initialisiert eine neue Instanz von LocalMarketDataDrive.

Eigenschaften

AvailableDataTypesCachePeriod
public TimeSpan AvailableDataTypesCachePeriod { get; set; }
value = localMarketDataDrive.AvailableDataTypesCachePeriod
localMarketDataDrive.AvailableDataTypesCachePeriod = value

How long the answer to "what does this whole drive hold" is reused before the folders are walked again. Zero, the default, walks them on every question.

AvailableSecurities
public IEnumerable<SecurityId> AvailableSecurities { get; }
value = localMarketDataDrive.AvailableSecurities

Verfügbare Finanzinstrumente.

Path
public override string Path { get; set; }
value = localMarketDataDrive.Path
localMarketDataDrive.Path = value

Pfad zu Marktdaten.

Methoden

BuildIndexAsync
public Task BuildIndexAsync(ILogReceiver logs, Action<int, int> updateProgress, CancellationToken cancellationToken)
result = localMarketDataDrive.BuildIndexAsync(logs, updateProgress, cancellationToken)

Erstellen Sie einen Index für eine schnelle Leistung beim Zugriff auf verfügbare Datentypen aus dem Speicher.

logs
Logs. Kann sein.
updateProgress
Fortschrittsbetreuer.
cancellationToken
CancellationToken

Rückgabe: Aufgabe

ChangeCachedDataType
private void ChangeCachedDataType(StorageFormats format, DataType dataType, bool remove)
localMarketDataDrive.ChangeCachedDataType(format, dataType, remove)

A day written for a data type proves the drive holds it, and the held answer can be told so without walking the folders again. A day removed may have been the last of its type, and only a fresh walk can tell, so the answer is given up instead. The read time is kept as it was: a type added here says nothing new about the rest of the drive.

GetAvailableDataTypesAsync
public override IAsyncEnumerable<DataType> GetAvailableDataTypesAsync(SecurityId securityId, StorageFormats format)
result = localMarketDataDrive.GetAvailableDataTypesAsync(securityId, format)

Holen Sie sich alle verfügbaren Datentypen.

securityId
Instrumentenkennung.
format
Formattyp.

Rückgabe: Datentypen.

GetAvailableSecuritiesAsync
public override IAsyncEnumerable<SecurityId> GetAvailableSecuritiesAsync()
result = localMarketDataDrive.GetAvailableSecuritiesAsync()

Holen Sie sich alle verfügbaren Instrumente.

Rückgabe: Verfügbare Instrumente.

GetDataType
public static DataType GetDataType(string fileName)
result = LocalMarketDataDrive.GetDataType(fileName)

Datentyp und Parameter für den angegebenen Dateinamen abrufen.

fileName
Der Dateiname.

Rückgabe: Datentyp und Parameter, die mit dem Typ assoziiert sind, z. B. Kerzen arg.

GetDate
public static DateTime GetDate(string dirName)
result = LocalMarketDataDrive.GetDate(dirName)

Konvertieren Sie den Verzeichnisnamen in das Datum.

dirName
Verzeichnisname.

Rückgabe: Das Datum.

GetDirName
public static string GetDirName(DateTime date)
result = LocalMarketDataDrive.GetDirName(date)

Konvertieren Sie das Datum in den Verzeichnisnamen.

date
Das Datum.

Rückgabe: Verzeichnisname.

GetExtension
public static string GetExtension(StorageFormats format)
result = LocalMarketDataDrive.GetExtension(format)

Um die Dateierweiterung für das Format zu erhalten.

format
Format.

Rückgabe: Die Verlängerung.

GetFileName
public static string GetFileName(DataType dataType, StorageFormats? format, bool throwIfUnknown)
result = LocalMarketDataDrive.GetFileName(dataType, format, throwIfUnknown)

Um den Dateinamen nach dem Typ der Daten zu erhalten.

dataType
Datenart-Info.
format
Speicherformat: Wenn Sie eine Erweiterung festlegen, wird sie dem Dateinamen hinzugefügt.
throwIfUnknown
Wirf eine Ausnahme, wenn der angegebene Typ unbekannt ist.

Rückgabe: Der Dateiname.

GetSecurityPath
public string GetSecurityPath(SecurityId securityId)
result = localMarketDataDrive.GetSecurityPath(securityId)

Um den Pfad zum Ordner mit Marktdaten für das Instrument zu erhalten.

securityId
Kennung des Finanzinstruments.

Rückgabe: Der Pfad zum Ordner mit Marktdaten.

GetStorageDrive
public override IMarketDataStorageDrive GetStorageDrive(SecurityId securityId, DataType dataType, StorageFormats format)
result = localMarketDataDrive.GetStorageDrive(securityId, dataType, format)

Um den Speicher für IMarketDataStorage zu erhalten.

securityId
Kennung des Finanzinstruments.
dataType
Datenart-Info.
format
Formattyp.

Rückgabe: Speicher für IMarketDataStorage.

LoadAsync
public override Task LoadAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = localMarketDataDrive.LoadAsync(storage, cancellationToken)

Load settings.

storage
Settings storage.
cancellationToken
CancellationToken

Rückgabe: Task

LookupSecuritiesAsync
public override IAsyncEnumerable<SecurityMessage> LookupSecuritiesAsync(SecurityLookupMessage criteria, ISecurityProvider securityProvider)
result = localMarketDataDrive.LookupSecuritiesAsync(criteria, securityProvider)

Laden Sie Finanzinstrumente nach den angegebenen Kriterien herunter.

criteria
Nachrichten-Finanzinstrument-Suche nach festgelegten Kriterien.
securityProvider
Der Anbieter von Informationen über Instrumente.

Rückgabe: Die Reihenfolge der gefundenen Instrumente.

SaveAsync
public override Task SaveAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = localMarketDataDrive.SaveAsync(storage, cancellationToken)

Save settings.

storage
Settings storage.
cancellationToken
CancellationToken

Rückgabe: Task

TrySaveIndex
public TimeSpan? TrySaveIndex(TimeSpan diff)
result = localMarketDataDrive.TrySaveIndex(diff)

Versuchen Sie, den vorhandenen Index zu speichern.

diff
Zeit Diff von Prev Index Änderung.

Rückgabe: Zeit, die durch den Build-Prozess benötigt wird. bedeutet, dass kein Build passiert ist.

VerifyAsync
public override ValueTask VerifyAsync(CancellationToken cancellationToken)
result = localMarketDataDrive.VerifyAsync(cancellationToken)

Überprüfen Sie die Einstellungen.

cancellationToken
CancellationToken

Rückgabe: ValueTask