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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user