Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add VirtualStaticsInInterfaces flag to RuntimeFeature #52733

Merged
merged 2 commits into from
May 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Runtime.Versioning;

namespace System.Runtime.CompilerServices
{
public static partial class RuntimeFeature
Expand All @@ -25,6 +27,12 @@ public static partial class RuntimeFeature
/// </summary>
public const string CovariantReturnsOfClasses = nameof(CovariantReturnsOfClasses);

/// <summary>
/// Indicates that this version of runtime supports virtual static members of interfaces.
/// </summary>
[RequiresPreviewFeatures]
public const string VirtualStaticsInInterfaces = nameof(VirtualStaticsInInterfaces);

/// <summary>
/// Checks whether a certain feature is supported by the Runtime.
/// </summary>
Expand All @@ -36,6 +44,7 @@ public static bool IsSupported(string feature)
case CovariantReturnsOfClasses:
case UnmanagedSignatureCallingConvention:
case DefaultImplementationsOfInterfaces:
case VirtualStaticsInInterfaces:
return true;
case nameof(IsDynamicCodeSupported):
return IsDynamicCodeSupported;
Expand Down
2 changes: 2 additions & 0 deletions src/libraries/System.Runtime/ref/System.Runtime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9766,6 +9766,8 @@ public static partial class RuntimeFeature
public const string DefaultImplementationsOfInterfaces = "DefaultImplementationsOfInterfaces";
public const string UnmanagedSignatureCallingConvention = "UnmanagedSignatureCallingConvention";
public const string PortablePdb = "PortablePdb";
[System.Runtime.Versioning.RequiresPreviewFeaturesAttribute]
public const string VirtualStaticsInInterfaces = "VirtualStaticsInInterfaces";
public static bool IsDynamicCodeCompiled { get { throw null; } }
public static bool IsDynamicCodeSupported { get { throw null; } }
public static bool IsSupported(string feature) { throw null; }
Expand Down