2020-03-16 14:02:08 +01:00
|
|
|
|
using Microsoft.Extensions.Configuration;
|
2020-03-19 19:06:05 +01:00
|
|
|
|
using Umbraco.Core;
|
2020-03-16 14:02:08 +01:00
|
|
|
|
using Umbraco.Core.Configuration;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Configuration.Models
|
|
|
|
|
|
{
|
|
|
|
|
|
internal class CoreDebugSettings : ICoreDebugSettings
|
|
|
|
|
|
{
|
2020-03-19 19:06:05 +01:00
|
|
|
|
private const string Prefix = Constants.Configuration.ConfigPrefix + "Core:Debug:";
|
2020-03-16 14:02:08 +01:00
|
|
|
|
private readonly IConfiguration _configuration;
|
2020-03-18 11:29:29 +01:00
|
|
|
|
|
2020-03-16 14:02:08 +01:00
|
|
|
|
public CoreDebugSettings(IConfiguration configuration)
|
|
|
|
|
|
{
|
|
|
|
|
|
_configuration = configuration;
|
|
|
|
|
|
}
|
2020-03-18 11:29:29 +01:00
|
|
|
|
|
|
|
|
|
|
public bool LogUncompletedScopes =>
|
2020-03-19 19:06:05 +01:00
|
|
|
|
_configuration.GetValue(Prefix+"LogUncompletedScopes", false);
|
2020-03-18 11:29:29 +01:00
|
|
|
|
|
|
|
|
|
|
public bool DumpOnTimeoutThreadAbort =>
|
2020-03-19 19:06:05 +01:00
|
|
|
|
_configuration.GetValue(Prefix+"DumpOnTimeoutThreadAbort", false);
|
2020-03-16 14:02:08 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|