From: Jan Kotas Date: Mon, 3 Dec 2018 18:26:14 +0000 (-0800) Subject: Add RuntimeFeature.IsDynamicCodeSupported/IsDynamicCodeCompiled X-Git-Tag: accepted/tizen/unified/20190422.045933~459 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3c5ec8aafd6edacdbf42f9a3aaf1494bf2860204;p=platform%2Fupstream%2Fcoreclr.git Add RuntimeFeature.IsDynamicCodeSupported/IsDynamicCodeCompiled Contributes to dotnet/corefx#29258 --- diff --git a/src/System.Private.CoreLib/System.Private.CoreLib.csproj b/src/System.Private.CoreLib/System.Private.CoreLib.csproj index 6f1c424..30f8416 100644 --- a/src/System.Private.CoreLib/System.Private.CoreLib.csproj +++ b/src/System.Private.CoreLib/System.Private.CoreLib.csproj @@ -117,6 +117,7 @@ + diff --git a/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/RuntimeFeature.cs b/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/RuntimeFeature.cs index c6a97ec..b0cd9dd 100644 --- a/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/RuntimeFeature.cs +++ b/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/RuntimeFeature.cs @@ -4,7 +4,7 @@ namespace System.Runtime.CompilerServices { - public static class RuntimeFeature + public static partial class RuntimeFeature { /// /// Name of the Portable PDB feature. @@ -30,6 +30,10 @@ namespace System.Runtime.CompilerServices case DefaultImplementationsOfInterfaces: #endif return true; + case nameof(IsDynamicCodeSupported): + return IsDynamicCodeSupported; + case nameof(IsDynamicCodeCompiled): + return IsDynamicCodeCompiled; } return false; diff --git a/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeFeature.CoreCLR.cs b/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeFeature.CoreCLR.cs new file mode 100644 index 0000000..69a7465 --- /dev/null +++ b/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeFeature.CoreCLR.cs @@ -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; + } +}