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

Commit ff220e9

Browse files
atsushikansafern
authored andcommitted
Implement Type.IsTypeDefinition property on CoreCLR (dotnet/coreclr#11355)
This api was just approved. https://github.com/dotnet/corefx/issues/17345 Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
1 parent 2d434fa commit ff220e9

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/Common/src/CoreLib/System/Reflection/TypeDelegator.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ protected override PropertyInfo GetPropertyImpl(string name, BindingFlags bindin
100100

101101
protected override TypeAttributes GetAttributeFlagsImpl() => typeImpl.Attributes;
102102

103+
public override bool IsTypeDefinition => typeImpl.IsTypeDefinition;
103104
public override bool IsSZArray => typeImpl.IsSZArray;
104105

105106
protected override bool IsArrayImpl() => typeImpl.IsArray;

src/Common/src/CoreLib/System/Type.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ protected Type() { }
3232
public override Type ReflectedType => null;
3333
public abstract Type UnderlyingSystemType { get; }
3434

35+
public virtual bool IsTypeDefinition { get { throw NotImplemented.ByDesign; } }
3536
public bool IsArray => IsArrayImpl();
3637
protected abstract bool IsArrayImpl();
3738
public bool IsByRef => IsByRefImpl();

0 commit comments

Comments
 (0)