Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
Fixed minifier crash due to missing support for delegate declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
Malware committed Aug 4, 2018
1 parent b6c4b74 commit 274cb2c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Source/MDK/Build/AnalysisExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,14 @@ public static string GetFullName(this MemberDeclarationSyntax declaration, Decla
return eventDeclaration.Identifier.ToString();
}

if (declaration is DelegateDeclarationSyntax delegateDeclaration)
{
var parentName = GetFullName(delegateDeclaration.Parent as MemberDeclarationSyntax);
if (parentName != null)
return $"{parentName}.{delegateDeclaration.Identifier}";
return delegateDeclaration.Identifier.ToString();
}

throw new ArgumentException("Do not understand the declaration type", nameof(declaration));
}

Expand Down

0 comments on commit 274cb2c

Please sign in to comment.