From bda8e173c9a2ef53ab2dd43c8e283adced67dea9 Mon Sep 17 00:00:00 2001 From: "H. Utku Maden" Date: Sun, 23 Aug 2026 20:56:19 +0300 Subject: [PATCH] Use new syntax to remove compile time warning from Application.Current. --- Dashboard.Common/Pal/Application.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dashboard.Common/Pal/Application.cs b/Dashboard.Common/Pal/Application.cs index e8fdaaa..cd0a2e4 100644 --- a/Dashboard.Common/Pal/Application.cs +++ b/Dashboard.Common/Pal/Application.cs @@ -192,11 +192,11 @@ namespace Dashboard.Pal public void Dispose() => InvokeDispose(true); - [ThreadStatic] private static Application _current; + [field: ThreadStatic] public static Application Current { - get => _current ?? throw new InvalidOperationException("There is currently no current application."); - set => _current = value; + get => field ?? throw new InvalidOperationException("There is currently no current application."); + set; } } }