From ea2f3832e670f234594d5fdc631c509e1d2f5f67 Mon Sep 17 00:00:00 2001 From: "reis@bitbucket.org" Date: Wed, 24 Oct 2018 18:07:51 -0700 Subject: [PATCH] Missing setter: Unhandled exception handler should be removed from the Topshelf #476 --- .../Configuration_Specs.cs | 2 ++ .../HostConfigurators/HostConfigurator.cs | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Topshelf.Extensions.Configuration.Tests/Configuration_Specs.cs b/src/Topshelf.Extensions.Configuration.Tests/Configuration_Specs.cs index 28f7cd83..a85e4cd4 100644 --- a/src/Topshelf.Extensions.Configuration.Tests/Configuration_Specs.cs +++ b/src/Topshelf.Extensions.Configuration.Tests/Configuration_Specs.cs @@ -531,6 +531,8 @@ class MyHostConfigurator : HostConfigurator public UnhandledExceptionPolicyCode UnhandledExceptionPolicy => throw new NotImplementedException(); + UnhandledExceptionPolicyCode HostConfigurator.UnhandledExceptionPolicy { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + public void AddCommandLineDefinition(string name, Action callback) { throw new NotImplementedException(); diff --git a/src/Topshelf/Configuration/HostConfigurators/HostConfigurator.cs b/src/Topshelf/Configuration/HostConfigurators/HostConfigurator.cs index 83d20034..35ac4434 100644 --- a/src/Topshelf/Configuration/HostConfigurators/HostConfigurator.cs +++ b/src/Topshelf/Configuration/HostConfigurators/HostConfigurator.cs @@ -127,10 +127,10 @@ public interface HostConfigurator /// The action to run when an exception occurs. void OnException(Action callback); - /// - /// The policy that will be used when Topself detects an UnhandledException in the - /// application. The default policy is to log an error and to stop the service. - /// - UnhandledExceptionPolicyCode UnhandledExceptionPolicy { get; } + /// + /// The policy that will be used when Topself detects an UnhandledException in the + /// application. The default policy is to log an error and to stop the service. + /// + UnhandledExceptionPolicyCode UnhandledExceptionPolicy { get; set; } } } \ No newline at end of file