Skip to content

Commit

Permalink
remove unnecessary lambda expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
Edward Miller authored and zcsizmadia committed Apr 22, 2024
1 parent 4bf34b9 commit 1f01369
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ZCS.DataContractResolver/DataContractResolver.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Runtime.Serialization;
Expand Down Expand Up @@ -85,7 +85,7 @@ private static IEnumerable<JsonPropertyInfo> CreateDataMembers(JsonTypeInfo json
propertyName = attr?.Name ?? fieldInfo.Name;
propertyType = fieldInfo.FieldType;
getValue = fieldInfo.GetValue;
setValue = (obj, value) => fieldInfo.SetValue(obj, value);
setValue = fieldInfo.SetValue;
}
else
if (memberInfo.MemberType == MemberTypes.Property && memberInfo is PropertyInfo propertyInfo)
Expand All @@ -98,7 +98,7 @@ private static IEnumerable<JsonPropertyInfo> CreateDataMembers(JsonTypeInfo json
}
if (propertyInfo.CanWrite)
{
setValue = (obj, value) => propertyInfo.SetValue(obj, value);
setValue = propertyInfo.SetValue;
}
}
else
Expand Down

0 comments on commit 1f01369

Please sign in to comment.