Skip to content

Commit

Permalink
#5 - melhorias
Browse files Browse the repository at this point in the history
  • Loading branch information
matmiranda committed Aug 16, 2023
1 parent 849e8d8 commit b783310
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions PagBank/Extension/EnumExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ public static string GetDescription(this BaseUrl value)
var type = value.GetType();
var memberInfo = type.GetMember(value.ToString());
var attributes = memberInfo[0].GetCustomAttributes(typeof(DescriptionAttribute), false);

return attributes.Length > 0
? ((DescriptionAttribute)attributes[0]).Description
: value.ToString();
return ((DescriptionAttribute)attributes[0]).Description;
}
}
}

0 comments on commit b783310

Please sign in to comment.