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

Commit

Permalink
Add RuntimeFeature detection for default interface method (#11940)
Browse files Browse the repository at this point in the history
  • Loading branch information
yizhang82 authored and Yi Zhang (CLR) committed Jun 26, 2017
1 parent eab2850 commit 5de1da7
Showing 1 changed file with 6 additions and 4 deletions.
Expand Up @@ -11,17 +11,19 @@ public static class RuntimeFeature
/// </summary>
public const string PortablePdb = nameof(PortablePdb);

/// Indicates that this version of runtime supports default interface method implementations.
/// </summary>
public const string DefaultImplementationsOfInterfaces = nameof(DefaultImplementationsOfInterfaces);

/// <summary>
/// Checks whether a certain feature is supported by the Runtime.
/// </summary>
public static bool IsSupported(string feature)
{
// Features should be added as public const string fields in the same class.
// Example: public const string FeatureName = nameof(FeatureName);

switch (feature)
{
case nameof(PortablePdb):
case PortablePdb:
case DefaultImplementationsOfInterfaces:
return true;
}

Expand Down

0 comments on commit 5de1da7

Please sign in to comment.