Vixen
dd8b0a81
csharp
public static class PlatformExtensions

Conveniences over IPlatform that no implementation should redefine.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Extension methods rather than default interface members, for a reason that only shows up in use: a default interface member is invisible through the concrete type, so headlessPlatform.Has(…) would not compile and every call site would need a cast to IPlatform first. Extensions bind on the static type either way.

Methods (3)

  • public static bool Has(this IPlatform platform, PlatformCapabilities required)

    Whether every capability in is present.

  • public static INativeDialogs? Pickers(this IPlatform platform)

    The file pickers, or when this platform has none.

  • public static IWindow? FocusedWindow(this IPlatform platform)

    The window that has keyboard focus, or if none does.

Used by (11)

  • DesktopPlatformTestsVixen.Platform.Desktop.Tests
  • DesktopSupplementTestsVixen.Platform.Desktop.Tests
  • HeadlessPlatformTestsVixen.Platform.Headless.Tests
  • PickerAvailabilityTestsVixen.Platform.Desktop.Tests
  • PlatformClipboardVixen.Platform.Ui
  • PlatformExtensionsTestsVixen.Platform.Headless.Tests
  • PlatformReachTestsVixen.Ui.Desktop.Tests
  • PlatformWindowHostVixen.Platform.Ui
  • PlatformWindowHostTestsVixen.Platform.Ui.Tests
  • VixenApplicationVixen.App.Hosting
  • EditorServicesVixen.Editor.App