Skip to content

Commit

Permalink
Add debug assert for type
Browse files Browse the repository at this point in the history
  • Loading branch information
benaadams committed Jan 20, 2021
1 parent 52bbce3 commit 9790c20
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2784,6 +2784,7 @@ internal static bool IsCustomAttributeDefinedHelper(
Type attributeType,
EventManifestOptions flags = EventManifestOptions.None)
{
Debug.Assert(attributeType == typeof(EventAttribute) || attributeType == typeof(EventSourceAttribute));
// AllowEventSourceOverride is an option that allows either Microsoft.Diagnostics.Tracing or
// System.Diagnostics.Tracing EventSource to be considered valid. This should not mattter anywhere but in Microsoft.Diagnostics.Tracing (nuget package).
if (!member.Module.Assembly.ReflectionOnly && (flags & EventManifestOptions.AllowEventSourceOverride) == 0)
Expand Down

0 comments on commit 9790c20

Please sign in to comment.