Add Type.GetMemberWithSameMetadataDefinitionAs (#53704)
authorEric Erhardt <eric.erhardt@microsoft.com>
Tue, 15 Jun 2021 21:14:10 +0000 (16:14 -0500)
committerGitHub <noreply@github.com>
Tue, 15 Jun 2021 21:14:10 +0000 (16:14 -0500)
commitcf7e7a46f8a4a6225a8f1e059a846ccdebf0454c
tree562ceca91d3578a4d0f933f702bf8e0590751b16
parent71e13c297dcd09cac53a41adb29e6965db473678
Add Type.GetMemberWithSameMetadataDefinitionAs (#53704)

* Add API to find MethodInfo on instantiated generic type from generic type definition

Fix #45771

* Rename to GetMemberWithSameMetadataDefinitionAs
* Fix a bug for NestedType
* Use new method libraries that were working around not having it

* Implement GetMemberWithSameMetadataDefinitionAs in mono

* Revert JavaScript Runtime changes.

* Support inheritance in GetMemberWithSameMetadataDefinitionAs.
19 files changed:
src/coreclr/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs
src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/NullableConverter.cs
src/libraries/System.Linq.Expressions/src/System/Dynamic/Utils/TypeUtils.cs
src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/ILGen.cs
src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Binary.cs
src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Expressions.cs
src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Unary.cs
src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/LambdaExpression.cs
src/libraries/System.Private.CoreLib/src/Resources/Strings.resx
src/libraries/System.Private.CoreLib/src/System/Reflection/TypeDelegator.cs
src/libraries/System.Private.CoreLib/src/System/Type.cs
src/libraries/System.Reflection/tests/TypeInfoTests.cs
src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/ObjectManager.cs
src/libraries/System.Runtime/ref/System.Runtime.cs
src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeEventInfo.cs
src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeFieldInfo.cs
src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.cs
src/mono/System.Private.CoreLib/src/System/Reflection/RuntimePropertyInfo.cs
src/mono/System.Private.CoreLib/src/System/RuntimeType.Mono.cs