Skip to content

Commit e600f6a

Browse files
committed
Clean up #pragma warning disable by marking as Obsolete
1 parent 1c30301 commit e600f6a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Assets/MRTK/Core/Utilities/WindowsApiChecker.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ namespace Microsoft.MixedReality.Toolkit.Windows.Utilities
2121
/// </remarks>
2222
public static class WindowsApiChecker
2323
{
24+
[Obsolete("The CheckApiContracts method is obsolete (and should not need to be called manually regardless) and will be removed from a future version of MRTK. Please use IsMethodAvailable(), IsPropertyAvailable() or IsTypeAvailable().")]
2425
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
2526
public static void CheckApiContracts()
2627
{
2728
// Disable the obsolete warning to enable setting the properties for legacy code.
28-
#pragma warning disable 0618
2929
#if WINDOWS_UWP
3030
UniversalApiContractV8_IsAvailable = ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 8);
3131
UniversalApiContractV7_IsAvailable = ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 7);
@@ -41,7 +41,6 @@ public static void CheckApiContracts()
4141
UniversalApiContractV4_IsAvailable = false;
4242
UniversalApiContractV3_IsAvailable = false;
4343
#endif // WINDOWS_UWP
44-
#pragma warning restore 0618
4544
}
4645

4746
/// <summary>

0 commit comments

Comments
 (0)