Use new syntax to remove compile time warning from Application.Current.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user