Skip to content
This repository has been archived by the owner on May 13, 2022. It is now read-only.

Commit

Permalink
Remove DOTNETWINRT_PRESENT usage
Browse files Browse the repository at this point in the history
  • Loading branch information
FejZa committed Sep 21, 2020
1 parent 6f7e987 commit a248a3b
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

#if WINDOWS_UWP
using Windows.Foundation.Metadata;
#elif (UNITY_WSA && DOTNETWINRT_PRESENT)
using Microsoft.Windows.Foundation.Metadata;
#endif // WINDOWS_UWP

namespace XRTK.WindowsMixedReality.Utilities
Expand All @@ -28,11 +26,11 @@ public static bool IsMethodAvailable(
string className,
string methodName)
{
#if WINDOWS_UWP || (UNITY_WSA && DOTNETWINRT_PRESENT)
#if WINDOWS_UWP
return ApiInformation.IsMethodPresent($"{namespaceName}.{className}", methodName);
#else
return false;
#endif // WINDOWS_UWP || (UNITY_WSA && DOTNETWINRT_PRESENT)
#endif // WINDOWS_UWP
}

/// <summary>
Expand All @@ -47,11 +45,11 @@ public static bool IsPropertyAvailable(
string className,
string propertyName)
{
#if WINDOWS_UWP || (UNITY_WSA && DOTNETWINRT_PRESENT)
#if WINDOWS_UWP
return ApiInformation.IsPropertyPresent($"{namespaceName}.{className}", propertyName);
#else
return false;
#endif // WINDOWS_UWP || (UNITY_WSA && DOTNETWINRT_PRESENT)
#endif // WINDOWS_UWP
}

/// <summary>
Expand All @@ -64,11 +62,11 @@ public static bool IsTypeAvailable(
string namespaceName,
string typeName)
{
#if WINDOWS_UWP || (UNITY_WSA && DOTNETWINRT_PRESENT)
#if WINDOWS_UWP
return ApiInformation.IsTypePresent($"{namespaceName}.{typeName}");
#else
return false;
#endif // UNITY_WSA && WINDOWS_UWP || (UNITY_WSA && DOTNETWINRT_PRESENT)
#endif // WINDOWS_UWP
}
}
}

0 comments on commit a248a3b

Please sign in to comment.