Пример #1
0
 public ServiceDebugHost(Service service, string serviceName,
     ServiceSettings settings, Logger logger)
 {
     this.serviceName = serviceName;
     this.service = service;
     this.service.Logger = logger;
     this.serviceSettings = settings;
     this.logger = logger;
 }
Пример #2
0
        public ServiceRuntimeHost(Service service, string serviceName,
            ServiceSettings serviceSettings, Logger logger)
        {
            this.service = service;
            this.service.Logger = logger;
            this.logger = logger;
            this.serviceSettings = serviceSettings;

            // set Microsoft service base properties
            this.ServiceName = serviceName;
            this.AutoLog = true;
            this.CanHandlePowerEvent = false;
            this.CanHandleSessionChangeEvent = false;
            this.CanPauseAndContinue = false;
            this.CanStop = true;
            this.CanShutdown = true;
        }