-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1070 from AArnott/ResurrectWin7Support
Resurrect win7 support
- Loading branch information
Showing
4 changed files
with
353 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace Microsoft.VisualStudio.Threading | ||
{ | ||
using System; | ||
|
||
/// <summary> | ||
/// A non-generic class used to store statics that do not vary by generic type argument. | ||
/// </summary> | ||
internal static class LightUps | ||
{ | ||
/// <summary> | ||
/// Gets a value indicating whether we execute Windows 7 code even on later versions of Windows. | ||
/// </summary> | ||
internal const bool ForceWindows7Mode = false; | ||
|
||
/// <summary> | ||
/// The <see cref="OperatingSystem.Version"/> for Windows 8. | ||
/// </summary> | ||
private static readonly Version Windows8Version = new Version(6, 2, 9200); | ||
|
||
/// <summary> | ||
/// Gets a value indicating whether the current operating system is Windows 8 or later. | ||
/// </summary> | ||
internal static bool IsWindows8OrLater | ||
{ | ||
get | ||
{ | ||
return !ForceWindows7Mode | ||
&& Environment.OSVersion.Platform == PlatformID.Win32NT | ||
&& Environment.OSVersion.Version >= Windows8Version; | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.