diff --git a/src/Umbraco.Core/Composing/Current.cs b/src/Umbraco.Core/Composing/Current.cs index 41e1ea2c21..055a29228a 100644 --- a/src/Umbraco.Core/Composing/Current.cs +++ b/src/Umbraco.Core/Composing/Current.cs @@ -24,7 +24,7 @@ namespace Umbraco.Composing public static IBackOfficeInfo BackOfficeInfo => EnsureInitialized(_backOfficeInfo); public static IProfiler Profiler => EnsureInitialized(_profiler); - public static bool IsInitialized { get; private set; } + public static bool IsInitialized { get; internal set; } [MethodImpl(MethodImplOptions.AggressiveInlining)] private static T EnsureInitialized(T returnValue) diff --git a/src/Umbraco.Tests.Integration/TestServerTest/UmbracoTestServerTestBase.cs b/src/Umbraco.Tests.Integration/TestServerTest/UmbracoTestServerTestBase.cs index d5c2616c6c..66635c12ce 100644 --- a/src/Umbraco.Tests.Integration/TestServerTest/UmbracoTestServerTestBase.cs +++ b/src/Umbraco.Tests.Integration/TestServerTest/UmbracoTestServerTestBase.cs @@ -78,7 +78,7 @@ namespace Umbraco.Tests.Integration.TestServerTest if (Current.IsInitialized) { - typeof(Current).GetProperty(nameof(Current.IsInitialized), BindingFlags.Public | BindingFlags.Static).SetValue(null, false); + Current.IsInitialized = false; } }