diff options
author | Atsushi Kanamori <AtsushiKan@users.noreply.github.com> | 2017-06-23 01:04:51 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-23 01:04:51 +0300 |
commit | 6eb340765c23345c865fa51eac2be5650193cb1a (patch) | |
tree | 545861f870a3bba89522aaa4a6454a9146bc0911 | |
parent | 03368a0176641682f3b1d24af9fc64cd03cf32ab (diff) |
Fix failing System.Runtime.Interop.Tests on ILC (#21376)
Fixes https://github.com/dotnet/corefx/issues/21348
Override all the remaining Reflection apis whose default
implementation is "throw". This will increase the chance
of success in the cases where the two CoreLib's have
different dependencies on Reflection objects passed into them.
We try actually try very hard to avoid these but there are
some cases where the cost of doing that is too high -
CustomAttributeExtensions being one of them.
-rw-r--r-- | src/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComAwareEventInfo.cs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComAwareEventInfo.cs b/src/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComAwareEventInfo.cs index dc50823bab..6e39874f2e 100644 --- a/src/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComAwareEventInfo.cs +++ b/src/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComAwareEventInfo.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Collections.Generic; using System.Reflection; using System.Security; @@ -54,6 +55,8 @@ namespace System.Runtime.InteropServices public override MethodInfo GetAddMethod(bool nonPublic) => _innerEventInfo.GetAddMethod(nonPublic); + public override MethodInfo[] GetOtherMethods(bool nonPublic) => _innerEventInfo.GetOtherMethods(nonPublic); + public override MethodInfo GetRaiseMethod(bool nonPublic) => _innerEventInfo.GetRaiseMethod(nonPublic); public override MethodInfo GetRemoveMethod(bool nonPublic) => _innerEventInfo.GetRemoveMethod(nonPublic); @@ -70,11 +73,17 @@ namespace System.Runtime.InteropServices return _innerEventInfo.GetCustomAttributes(inherit); } + public override IList<CustomAttributeData> GetCustomAttributesData() => _innerEventInfo.GetCustomAttributesData(); + public override bool IsDefined(Type attributeType, bool inherit) { return _innerEventInfo.IsDefined(attributeType, inherit); } + public override int MetadataToken => _innerEventInfo.MetadataToken; + + public override Module Module => _innerEventInfo.Module; + public override string Name => _innerEventInfo.Name; public override Type ReflectedType => _innerEventInfo.ReflectedType; |