1- using Microsoft . Extensions . Logging . Abstractions ;
1+ using System . Diagnostics ;
2+ using Microsoft . Extensions . Logging . Abstractions ;
23using Uno . Extensions . Navigation . Regions ;
34
45namespace Uno . Extensions . Navigation . UI ;
@@ -9,26 +10,10 @@ namespace Uno.Extensions.Navigation.UI;
910public static class Region
1011{
1112 private static ILogger ? _logger ;
12- private static int _loggerWarningIssued ;
1313
1414 internal static ILogger Logger
1515 {
16- get
17- {
18- if ( _logger is null && Interlocked . CompareExchange ( ref _loggerWarningIssued , 1 , 0 ) == 0 )
19- {
20- // This warning is expected when Region.Attached="True" is used before the navigation
21- // host is fully started (e.g., inside ExtendedSplashScreen content). The region will
22- // be properly initialized once the view is loaded and services become available.
23- // Navigation logging will be disabled until NavigationHostedService.StartAsync runs.
24- System . Diagnostics . Debug . WriteLine (
25- "[Uno.Extensions.Navigation] Region.Attached is being used before the navigation host has fully started. " +
26- "This typically happens when Region.Attached=\" True\" is set on content inside an ExtendedSplashScreen. " +
27- "The region will defer its full initialization until services are available. " +
28- "Navigation logging is temporarily disabled and will be enabled once the host starts." ) ;
29- }
30- return _logger ?? NullLogger < NavigationRegion > . Instance ;
31- }
16+ get => _logger ?? NullLogger < NavigationRegion > . Instance ;
3217 set => _logger = value ;
3318 }
3419
0 commit comments