Add comment about not using an exception filter

\n\nCommit migrated from b6abd65ea2
This commit is contained in:
Larry Ewing 2019-05-07 18:00:45 -05:00 committed by Ryan Nowak
parent 10e316f541
commit 2706bc5610
1 changed files with 3 additions and 3 deletions

View File

@ -171,7 +171,7 @@ namespace Microsoft.JSInterop
{ {
return methodInfo.Invoke(targetInstance, suppliedArgs); return methodInfo.Invoke(targetInstance, suppliedArgs);
} }
catch (TargetInvocationException tie) catch (TargetInvocationException tie) // Avoid using exception filters for AOT runtime support
{ {
if (tie.InnerException != null) if (tie.InnerException != null)
{ {
@ -243,8 +243,8 @@ namespace Microsoft.JSInterop
var invokableMethods = GetRequiredLoadedAssembly(assemblyName) var invokableMethods = GetRequiredLoadedAssembly(assemblyName)
.GetExportedTypes() .GetExportedTypes()
.SelectMany(type => type.GetMethods( .SelectMany(type => type.GetMethods(
BindingFlags.Public | BindingFlags.Public |
BindingFlags.DeclaredOnly | BindingFlags.DeclaredOnly |
BindingFlags.Instance | BindingFlags.Instance |
BindingFlags.Static)) BindingFlags.Static))
.Where(method => method.IsDefined(typeof(JSInvokableAttribute), inherit: false)); .Where(method => method.IsDefined(typeof(JSInvokableAttribute), inherit: false));