Skip to content

Commit

Permalink
Small coding style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Eneuman committed Mar 12, 2021
1 parent 1b4c67f commit e4504b7
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ public static bool IsNonNullableReferenceType(this MemberInfo memberInfo)
private static object GetNullableAttribute(this MemberInfo memberInfo)
{
var nullableAttribute = memberInfo.GetCustomAttributes()
.FirstOrDefault(attr => string.Equals(attr.GetType().FullName, NullableAttributeFullTypeName));
.Where(attr => string.Equals(attr.GetType().FullName, NullableAttributeFullTypeName))
.FirstOrDefault();

return nullableAttribute;
}
Expand All @@ -80,7 +81,8 @@ private static bool GetNullableFallbackValue(this MemberInfo memberInfo)
var attributes = (IEnumerable<object>)declaringType.GetCustomAttributes(false);

var nullableContext = attributes
.FirstOrDefault(attr => string.Equals(attr.GetType().FullName, NullableContextAttributeFullTypeName));
.Where(attr => string.Equals(attr.GetType().FullName, NullableContextAttributeFullTypeName))
.FirstOrDefault();

if (nullableContext != null)
{
Expand Down

0 comments on commit e4504b7

Please sign in to comment.