Created
March 5, 2018 20:39
-
-
Save newyear2006/55999bffce3316269f864287e324ee5c to your computer and use it in GitHub Desktop.
UWP ApiFeatures per Powershell abfragen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# zunächst brauchen wir eine Windows Runtime Referenz | |
Add-Type -AssemblyName System.Runtime.WindowsRuntime | |
# dann die passende API-Laden, https://docs.microsoft.com/en-us/uwp/api/windows.foundation.metadata.apiinformation | |
[Windows.Foundation.Metadata.ApiInformation,Windows.Foundation.UniversalAPIContract,ContentType=WindowsRuntime] | |
# Featureabfrage | |
[Windows.Foundation.Metadata.ApiInformation]::IsTypePresent("Windows.Media.Playlists.Playlist") | |
# oder API-Contract mit Version | |
[Windows.Foundation.Metadata.ApiInformation]::IsApiContractPresent("Windows.Foundation.UniversalApiContract", 1,0) | |
# bisher bekannte API-Contracts: https://docs.microsoft.com/en-us/uwp/extension-sdks/windows-universal-sdk | |
# genauer: https://docs.microsoft.com/en-us/uwp/extension-sdks/ | |
# Windows UWP Namespaces: https://docs.microsoft.com/de-de/uwp/api/ | |
# hier noch ein Blogeitnrag zur Feature-Detection: https://blogs.windows.com/buildingapps/2015/09/15/dynamically-detecting-features-with-api-contracts-10-by-10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment