Skip to content

Commit 641b018

Browse files
authored
Add API for runtime CoreCLR check (#912)
Add API for runtime CoreCLR check
1 parent 87b719b commit 641b018

File tree

1 file changed

+22
-0
lines changed
  • src/PowerShellEditorServices/Utility

1 file changed

+22
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
//
2+
// Copyright (c) Microsoft. All rights reserved.
3+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
4+
//
5+
6+
namespace Microsoft.PowerShell.EditorServices
7+
{
8+
/// <summary>
9+
/// General purpose common utilities to prevent reimplementation.
10+
/// </summary>
11+
internal static class Utils
12+
{
13+
/// <summary>
14+
/// True if we are running on .NET Core, false otherwise.
15+
/// </summary>
16+
#if CoreCLR
17+
public static bool IsNetCore { get; } = true;
18+
#else
19+
public static bool IsNetCore { get; } = false;
20+
#endif
21+
}
22+
}

0 commit comments

Comments
 (0)