Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyrrrz committed Apr 6, 2024
1 parent e1b1d0f commit d3e081c
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions LightBulb/Utils/Extensions/AvaloniaExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@ namespace LightBulb.Utils.Extensions;

internal static class AvaloniaExtensions
{
public static Window? TryGetMainWindow(this IApplicationLifetime lifetime)
{
if (lifetime is IClassicDesktopStyleApplicationLifetime desktopLifetime)
return desktopLifetime.MainWindow;

return null;
}
public static Window? TryGetMainWindow(this IApplicationLifetime lifetime) =>
lifetime is IClassicDesktopStyleApplicationLifetime desktopLifetime
? desktopLifetime.MainWindow
: null;

public static void Shutdown(this IApplicationLifetime lifetime, int exitCode = 0)
{
Expand Down

0 comments on commit d3e081c

Please sign in to comment.