DriveCache

StockSharp.Algo.Storages

IMarketDataDrive cache.

Inherits: Disposable

Implements: IAsyncPersistable

Constructors

DriveCache
public DriveCache(IFileSystem fileSystem)
driveCache = DriveCache(fileSystem)

Initializes a new instance of the DriveCache.

fileSystem
File system abstraction.

Properties

DefaultDrive
public IMarketDataDrive DefaultDrive { get; }
value = driveCache.DefaultDrive

The storage used by default.

Drives
public IEnumerable<IMarketDataDrive> Drives { get; }
value = driveCache.Drives

Available storages.

TryDefaultDrive
public IMarketDataDrive TryDefaultDrive { get; }
value = driveCache.TryDefaultDrive

The storage used by default.

Methods

DeleteDrive
public void DeleteDrive(IMarketDataDrive drive)
driveCache.DeleteDrive(drive)

Delete storage.

drive
Market data storage.
DisposeManaged
protected override void DisposeManaged()
driveCache.DisposeManaged()

Release resources.

GetDrive
public IMarketDataDrive GetDrive(string path)
result = driveCache.GetDrive(path)

To get the storage for .

path
Path.

Returns: Market data storage.

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

Load settings.

storage
Settings storage.
cancellationToken
CancellationToken

Returns: Task

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

Save settings.

storage
Settings storage.
cancellationToken
CancellationToken

Returns: Task

Update
public void Update()
driveCache.Update()

Invoke Changed event.

Events

Changed
public event Action Changed
driveCache.Changed += handler

Cache changed event.

DriveDeleted
public event Action<IMarketDataDrive> DriveDeleted
driveCache.DriveDeleted += handler

Storage removed event.

NewDriveCreated
public event Action<IMarketDataDrive> NewDriveCreated
driveCache.NewDriveCreated += handler

New storage created event.