void IService.StartService() { _extensionService = ServiceContext.GetService <ExtensionService>(); foreach (var extension in _extensionService.GetExtensions <ITestEventListener>()) { _listenerExtensions.Add(extension); } Status = _extensionService == null ? ServiceStatus.Error : ServiceStatus.Started; }
public void StartService() { _runtimeService = ServiceContext.GetService <IRuntimeFrameworkService>(); _extensionService = ServiceContext.GetService <ExtensionService>(); if (_runtimeService == null) { Status = ServiceStatus.Error; } else { try { // Add plugable agents first, so they can override the builtins if (_extensionService != null) { foreach (IAgentLauncher launcher in _extensionService.GetExtensions <IAgentLauncher>()) { _launchers.Add(launcher); } } //_launchers.Add(new Net20AgentLauncher()); _launchers.Add(new Net40AgentLauncher()); _launchers.Add(new NetCore21AgentLauncher()); _launchers.Add(new NetCore31AgentLauncher()); _launchers.Add(new Net50AgentLauncher()); _remotingTransport.Start(); _tcpTransport.Start(); Status = ServiceStatus.Started; } catch { Status = ServiceStatus.Error; throw; } } }