Ensure there are custom attributes before attempting to resolve
This commit is contained in:
parent
77ba50dff9
commit
90487aa452
@ -524,7 +524,7 @@ namespace System.Diagnostics
|
|||||||
var parameterTypeString = "?";
|
var parameterTypeString = "?";
|
||||||
if (parameterType != null)
|
if (parameterType != null)
|
||||||
{
|
{
|
||||||
if (parameterType.IsGenericType)
|
if (parameterType.IsGenericType && parameter.CustomAttributes.Any())
|
||||||
{
|
{
|
||||||
var tupleNames = parameter.GetCustomAttributes<TupleElementNamesAttribute>().FirstOrDefault()?.TransformNames;
|
var tupleNames = parameter.GetCustomAttributes<TupleElementNamesAttribute>().FirstOrDefault()?.TransformNames;
|
||||||
if (tupleNames != null)
|
if (tupleNames != null)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user