Skip to content

Commit

Permalink
Update assembly check on EventHandlerTagHelperDescriptorProvider (#31458
Browse files Browse the repository at this point in the history
)
  • Loading branch information
captainsafia authored Apr 1, 2021
1 parent b12b64e commit 7bc87ba
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ public void Execute(TagHelperDescriptorProviderContext context)
return;
}

var targetAssembly = context.Items.GetTargetAssembly();
if (targetAssembly is not null && !SymbolEqualityComparer.Default.Equals(targetAssembly, eventHandlerAttribute.ContainingAssembly))
{
return;
}

var eventHandlerData = GetEventHandlerData(context, compilation, eventHandlerAttribute);

foreach (var tagHelper in CreateEventHandlerTagHelpers(eventHandlerData))
Expand Down

0 comments on commit 7bc87ba

Please sign in to comment.