Ejemplo n.º 1
0
 public void StartService()
 {
     _runtimeService = ServiceContext.GetService <IRuntimeFrameworkService>();
     if (_runtimeService == null)
     {
         Status = ServiceStatus.Error;
     }
     else
     {
         try
         {
             _remotingTransport.Start();
             _tcpTransport.Start();
             Status = ServiceStatus.Started;
         }
         catch
         {
             Status = ServiceStatus.Error;
             throw;
         }
     }
 }
Ejemplo n.º 2
0
        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;
                }
            }
        }