Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
Add RuntimeFeature.IsDynamicCodeSupported/IsDynamicCodeCompiled
Browse files Browse the repository at this point in the history
Contributes to dotnet/corefx#29258
  • Loading branch information
jkotas committed Dec 4, 2018
1 parent 2755ed0 commit 3c5ec8a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/System.Private.CoreLib/System.Private.CoreLib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@
<ItemGroup>
<Compile Include="$(BclSourcesRoot)\System\Runtime\CompilerServices\ICastableHelpers.cs" />
<Compile Include="$(BclSourcesRoot)\System\Runtime\CompilerServices\RuntimeHelpers.cs" />
<Compile Include="$(BclSourcesRoot)\System\Runtime\CompilerServices\RuntimeFeature.CoreCLR.cs" />
<Compile Include="$(BclSourcesRoot)\System\Runtime\CompilerServices\TypeDependencyAttribute.cs" />
<Compile Include="$(BclSourcesRoot)\System\Runtime\CompilerServices\jithelpers.cs" />
<Compile Include="$(BclSourcesRoot)\System\Runtime\CompilerServices\ConditionalWeakTable.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace System.Runtime.CompilerServices
{
public static class RuntimeFeature
public static partial class RuntimeFeature
{
/// <summary>
/// Name of the Portable PDB feature.
Expand All @@ -30,6 +30,10 @@ public static bool IsSupported(string feature)
case DefaultImplementationsOfInterfaces:
#endif
return true;
case nameof(IsDynamicCodeSupported):
return IsDynamicCodeSupported;
case nameof(IsDynamicCodeCompiled):
return IsDynamicCodeCompiled;
}

return false;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

namespace System.Runtime.CompilerServices
{
public static partial class RuntimeFeature
{
public static bool IsDynamicCodeSupported => true;
public static bool IsDynamicCodeCompiled => true;
}
}

0 comments on commit 3c5ec8a

Please sign in to comment.