-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Open
Labels
Description
We should never use this pattern:
Avalonia/src/Avalonia.Base/Media/FontManager.cs
Lines 39 to 58 in cdc7bf3
public static FontManager Current | |
{ | |
get | |
{ | |
var current = AvaloniaLocator.Current.GetService<FontManager>(); | |
if (current != null) | |
{ | |
return current; | |
} | |
var fontManagerImpl = AvaloniaLocator.Current.GetRequiredService<IFontManagerImpl>(); | |
current = new FontManager(fontManagerImpl); | |
AvaloniaLocator.CurrentMutable.Bind<FontManager>().ToConstant(current); | |
return current; | |
} | |
} |