public async Task <bool> StartPlatform(string userId, TradingPlatform platform) { if (!IsPlatformJobRunning(userId)) { runningPlatforms[userId] = platform; CancellationTokenSource token = new CancellationTokenSource(); await platform.StartPlatformJob(token, userId); } return(IsPlatformJobRunning(userId)); }
public PlatformLiveLogsController(PlatformJobsRepository jobRepo , PlatformLogsRepository jobLogsRepo , StrategyRunsRepository runsRepo , StrategyLogsRepository runsLogRepo , ExchangeLogsRepository exchangeLogsRepo , TradingJobServiceFactory jobsFactory , TradingPlatform TradingPlatform , ILoggingService log) { this.jobRepo = jobRepo; this.jobLogsRepo = jobLogsRepo; this.runsRepo = runsRepo; this.runsLogRepo = runsLogRepo; this.exchangeLogsRepo = exchangeLogsRepo; this.jobsFactory = jobsFactory; this.log = log; this.TradingPlatform = TradingPlatform; }
public void Delete(TradingPlatform entity) { Repository.Delete(entity); }
public void Add(TradingPlatform entity) { Repository.Add(entity); }
public void getPlatformStatus(TradingPlatform tradingPlatform) { throw new System.NotImplementedException(); }