private void TryStartOneDasEngine(OneDasEngine oneDasEngine, string projectFilePath) { if (File.Exists(projectFilePath)) { Task.Run(() => { IOneDasProjectSerializer oneDasProjectSerializer; oneDasProjectSerializer = _serviceProvider.GetRequiredService <IOneDasProjectSerializer>(); try { oneDasEngine.ActivateProject(oneDasProjectSerializer.Load(projectFilePath), 4); oneDasEngine.Start(); } catch (Exception ex) { oneDasEngine.HandleException(ex); } }); } }
public Task StartOneDas() { return(Task.Run(() => _engine.Start())); }