public Start ( StopConditions stopConditions ) : void | ||
stopConditions | StopConditions | |
Résultat | void |
public void Start(Project project) { if (_running != null) { Console.WriteLine($"AGENT: Trying to start specification runner for {_running.GetType().Name} at {project.ProjectPath} and port {project.Port}"); } Project.CurrentProject = project; _project = project; Type systemType = null; try { if (_running == null) { buildRunningSystem(); } if (project.Mode == EngineMode.ExportOnly) { EventAggregator.SendMessage(_running.RecycledMessage); return; } _engine = project.Mode == EngineMode.Interactive ? buildUserInterfaceEngine() : buildBatchedEngine(project.TracingStyle); _engine.Start(project.StopConditions); ConsoleWriter.Write("AGENT: Specification running engine ready at " + project.ProjectPath); } catch (Exception e) { StorytellerAgent.LogFailure(e); ConsoleWriter.Write(ConsoleColor.Red, e.ToString()); var message = new SystemRecycled { error = e.ToString(), success = false, }; EventAggregator.SendMessage(message); } }
public void Start(Project project) { if (_system != null) { Console.WriteLine($"AGENT: Trying to start specification runner for {_system.GetType().Name} at {project.ProjectPath} and port {project.Port}"); } Project.CurrentProject = project; _project = project; Type systemType = null; try { if (_system == null) { systemType = _project.DetermineSystemType(); _system = Activator.CreateInstance(systemType).As <ISystem>(); _disposables.Add(_system); } _specExpiration = new SpecExpiration(); _engine = project.Mode == EngineMode.Interactive ? buildUserInterfaceEngine() : buildBatchedEngine(project.TracingStyle); _engine.Start(project.StopConditions); ConsoleWriter.Write("AGENT: Specification running engine ready at " + project.ProjectPath); } catch (Exception e) { ConsoleWriter.Write(ConsoleColor.Red, e.ToString()); var message = new SystemRecycled { error = e.ToString(), success = false, }; if (systemType != null) { message.system_name = systemType.AssemblyQualifiedName; } EventAggregator.SendMessage(message); } }
public void Start(Project project) { if (_running != null) { Console.WriteLine($"AGENT: Trying to start specification runner for {_running.GetType().Name} at {project.ProjectPath} and port {project.Port}"); } Project.CurrentProject = project; _project = project; try { _engine = buildUserInterfaceEngine(); _engine.Start(project.StopConditions); ConsoleWriter.Write("AGENT: Specification running engine ready at " + project.ProjectPath); } catch (Exception e) { StorytellerAgent.LogFailure(e); ConsoleWriter.Write(ConsoleColor.Red, e.ToString()); var message = new SystemRecycled { error = e.ToString(), success = false, }; EventAggregator.SendMessage(message); } }
public void Start(Project project) { if (_system != null) { Console.WriteLine($"AGENT: Trying to start specification runner for {_system.GetType().Name} at {project.ProjectPath} and port {project.Port}"); } Project.CurrentProject = project; _project = project; Type systemType = null; try { if (_system == null) { systemType = _project.DetermineSystemType(); _system = Activator.CreateInstance(systemType).As<ISystem>(); _disposables.Add(_system); } if (project.Mode == EngineMode.ExportOnly) { var recycled = _system.Initialize(lib => { }); EventAggregator.SendMessage(recycled); return; } _engine = project.Mode == EngineMode.Interactive ? buildUserInterfaceEngine() : buildBatchedEngine(project.TracingStyle); _engine.Start(project.StopConditions); ConsoleWriter.Write("AGENT: Specification running engine ready at " + project.ProjectPath); } catch (Exception e) { ConsoleWriter.Write(ConsoleColor.Red, e.ToString()); var message = new SystemRecycled { error = e.ToString(), success = false, }; if (systemType != null) { message.system_name = systemType.AssemblyQualifiedName; } EventAggregator.SendMessage(message); } }