Skip to content

Commit

Permalink
Fixes #1372
Browse files Browse the repository at this point in the history
  • Loading branch information
epignatelli authored and Fraser Greenroyd committed Dec 4, 2019
1 parent 5540cc5 commit ba775cc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Reflection_Engine/Query/IsDeprecated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,16 @@ public static bool IsDeprecated(this MethodBase method)
DeprecatedAttribute attribute = method.GetCustomAttribute<DeprecatedAttribute>();
if (attribute != null)
return true;
else
return false;
}

if (method.DeclaringType.IsDeprecated())
return true;

return false;
}

/***************************************************/

public static bool IsDeprecated(this Type type)
public static bool IsDeprecated(this Type type)
{
DeprecatedAttribute attribute = type.GetCustomAttribute<DeprecatedAttribute>();
if (attribute != null)
Expand Down

0 comments on commit ba775cc

Please sign in to comment.