public InstrumentServerService() { this.ServiceName = InstrumentServerService.NameOfService; this.EventLog.Log = "Application"; this.CanHandlePowerEvent = false; this.CanHandleSessionChangeEvent = false; this.CanPauseAndContinue = false; this.CanShutdown = false; this.CanStop = true; string path = BasePath() ?? DefaultBasePath(); EventLog.WriteEntry($"Starting with path {BasePath()} (Default: {DefaultBasePath()}), config {Config()} (Default: {DefaultConfig()}), hostname {Hostname()} (Default: {DefaultHostname()}), scripts enabled {ScriptsEnabled()}, scripts directory {ScriptsDirectory()} (Default: {DefaultScriptsDirectory()}), values taken from {InstrumentalRegistryKey()}", EventLogEntryType.Information); this.ProcessWorker = new InstrumentServerProcessWorker(EventLog, path, Config() ?? DefaultConfig(), Hostname() ?? DefaultHostname(), ScriptsEnabled(), ScriptsDirectory() ?? DefaultScriptsDirectory()); }
public InstrumentServerService() { this.ServiceName = InstrumentServerService.NameOfService; this.EventLog.Log = "Application"; this.CanHandlePowerEvent = false; this.CanHandleSessionChangeEvent = false; this.CanPauseAndContinue = false; this.CanShutdown = false; this.CanStop = true; string path = BasePath() ?? DefaultBasePath(); EventLog.WriteEntry($"Starting with path {BasePath()} (Default: {DefaultBasePath()}), config {Config()} (Default: {DefaultConfig()}), hostname {Hostname()} (Default: {DefaultHostname()}), scripts enabled {ScriptsEnabled()}, scripts directory {ScriptsDirectory()} (Default: {DefaultScriptsDirectory()}), values taken from {InstrumentalRegistryKey()}", EventLogEntryType.Information); this.ProcessWorker = new InstrumentServerProcessWorker(EventLog, path, Config() ?? DefaultConfig(), Hostname() ?? DefaultHostname(), ScriptsEnabled(), ScriptsDirectory() ?? DefaultScriptsDirectory()); }