Browse Source

Remove Lazy usage where it's not needed anymore

pull/9760/head
Max Katz 4 years ago
parent
commit
d3836a40ea
  1. 6
      src/Avalonia.Base/Platform/StandardRuntimePlatform.cs

6
src/Avalonia.Base/Platform/StandardRuntimePlatform.cs

@ -14,13 +14,13 @@ namespace Avalonia.Platform
public IUnmanagedBlob AllocBlob(int size) => new UnmanagedBlob(size);
private static readonly Lazy<RuntimePlatformInfo> Info = new(() => new RuntimePlatformInfo
private static readonly RuntimePlatformInfo s_info = new()
{
IsDesktop = OperatingSystemEx.IsWindows() || OperatingSystemEx.IsMacOS() || OperatingSystemEx.IsLinux(),
IsMobile = OperatingSystemEx.IsAndroid() || OperatingSystemEx.IsAndroid()
});
};
public virtual RuntimePlatformInfo GetRuntimeInfo() => Info.Value;
public virtual RuntimePlatformInfo GetRuntimeInfo() => s_info;
}
}

Loading…
Cancel
Save