unoplatform/uno

Add an API to get the current Uno Platform target at runtime

开放

#11,545 创建于 2023年3月2日

 (4 条评论) (3 个反应) (0 位负责人)C# (837 个派生)batch import
difficulty/starter 🚀good first issuekind/enhancementlow-hanging-🍒no-repro

仓库指标

星标
 (9,789 个星标)
PR 合并指标
 (平均合并 14天 8小时) (30 天内合并 130 个 PR)

描述

What would you like to be added:

Currently it is possible to conditionally compile code to run on specific platforms, but there is no easy way to check the current Uno target at runtime. This would be especially useful to differentiate between Skia targets.

This could be a simple static method that would return an enum with Windows, iOS, SkiaWpf, SkiaGtk, etc.

Why is this needed:

Runtime checks

For which Platform:

All

贡献者指南