/// <summary> /// Starts the hosted service. /// </summary> public void Start() { if (host != null) { throw new InvalidOperationException("ServiceHost instances cannot be reused."); } SysLog.LogProvider = logProvider; host = new ApplicationServiceHost(); host.Initialize(args, service, logProvider, true); service.Start(host, args); }