Beispiel #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;
 }
        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;
        }
Beispiel #3
0
 public static void Initialize(Logger daemonNTLogger)
 {
     EventLog.daemonNTLogger = daemonNTLogger;
 }