Skip to content

Commit

Permalink
Update VerifierSettings.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Oct 7, 2023
1 parent 334593d commit b5397be
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Verify/Naming/VerifierSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ static void GetNameForParameter(object? parameter, StringBuilder builder, bool i

var type = parameter.GetType();

if (parameterToNameLookup.TryGetValue(type, out var lookup))
{
builder.Append(lookup(parameter));
return;
}

foreach (var (key, value) in parameterToNameLookup)
{
if (key.IsAssignableFrom(type))
Expand All @@ -77,6 +83,7 @@ static void GetNameForParameter(object? parameter, StringBuilder builder, bool i
{
builder.Append('[');
}

foreach (var item in enumerable)
{
GetNameForParameter(item, builder, false);
Expand Down

0 comments on commit b5397be

Please sign in to comment.