/// <summary> /// Получить хранилище маркет-данных. /// </summary> /// <param name="path">Путь к данным.</param> /// <returns>Хранилище маркет-данных.</returns> public IMarketDataDrive GetDrive(string path) { if (path.IsEmpty()) { return(DefaultDrive); } return(_drives.SafeAdd(path ?? string.Empty, key => { IMarketDataDrive drive; try { var addr = path.To <EndPoint>(); drive = new RemoteMarketDataDrive(new RemoteStorageClient(new Uri(addr.To <string>()))); } catch { drive = new LocalMarketDataDrive(path); } NewDriveCreated.SafeInvoke(drive); return drive; })); }
public StudioDrive() { _localDrive = new LocalMarketDataDrive(); _remoteDrive = new RemoteMarketDataDrive(); _cacheDrive = new LocalMarketDataDrive(Path.Combine(BaseApplication.AppDataPath, "Cache")); }
public StudioDrive() { _localDrive = new LocalMarketDataDrive(); _remoteDrive = new RemoteMarketDataDrive(); _cacheDrive = new LocalMarketDataDrive(Path.Combine(BaseApplication.AppDataPath, "Cache")); }