Skip to content

Commit

Permalink
last fix for attributes order
Browse files Browse the repository at this point in the history
  • Loading branch information
renanrcp committed Oct 29, 2020
1 parent 7e6d9ba commit 52303d8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions MariCommands/Extensions/MariCommandsReflectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@ public static T GetAttribute<T>(this ParameterInfo parameterInfo)

public static IEnumerable<Attribute> GetAllAttributes(this MemberInfo memberInfo)
{
return memberInfo.GetCustomAttributes(false)
return memberInfo.GetCustomAttributes(true)
.Select(a => (Attribute)a)
.OrderBy(a => ((Type)a.TypeId).MetadataToken)
.ToList();
}

public static IEnumerable<Attribute> GetAllAttributes(this ParameterInfo memberInfo)
{
return memberInfo.GetCustomAttributes(false)
return memberInfo.GetCustomAttributes(true)
.Select(a => (Attribute)a)
.ToList();
}
Expand Down

0 comments on commit 52303d8

Please sign in to comment.