Use null-propogation where applicable and useful.

Primarily where it means one fewer field-access or simplifies
event delegate invocation, though one or two cases have just the
lesser advantage of allowing an IL stack dup rather than local access.
This commit is contained in:
Jon Hanna
2017-01-03 20:08:12 +00:00
parent 3ae09a80f0
commit b567a066e6
19 changed files with 67 additions and 123 deletions
@@ -123,13 +123,7 @@ namespace Newtonsoft.Json.Utilities
return m.GetBaseDefinition();
}
m = propertyInfo.GetSetMethod(true);
if (m != null)
{
return m.GetBaseDefinition();
}
return null;
return propertyInfo.GetSetMethod(true)?.GetBaseDefinition();
}
public static bool IsPublic(PropertyInfo property)