Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove IRuntimePlatform.OperatingSystem API and replace with trimmable OperatingSystem API #9760

Merged
merged 6 commits into from
Dec 23, 2022
6 changes: 3 additions & 3 deletions src/Avalonia.Base/Platform/StandardRuntimePlatform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ public IDisposable StartSystemTimer(TimeSpan interval, Action tick)

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()
maxkatz6 marked this conversation as resolved.
Show resolved Hide resolved
});
};


public virtual RuntimePlatformInfo GetRuntimeInfo() => Info.Value;
public virtual RuntimePlatformInfo GetRuntimeInfo() => s_info;
}
}