Small improvements
This commit is contained in:
1 parent
86c22cfe85
commit
81c4915d16
2 files changed
+9
-43
No files matched your search
@@ -123,10 +123,10 @@ namespace DynamORM.Mapper
|
||||
|
||||
private Func<object, object> CreateGetter(PropertyInfo property)
|
||||
{
|
||||
if (!property.CanRead)
|
||||
if (property == null || !property.CanRead)
|
||||
return null;
|
||||
|
||||
ParameterExpression objParm = Expression.Parameter(typeof(object), "o");
|
||||
var objParm = Expression.Parameter(typeof(object), "o");
|
||||
|
||||
return Expression.Lambda<Func<object, object>>(
|
||||
Expression.Convert(
|
||||
@@ -141,8 +141,8 @@ namespace DynamORM.Mapper
|
||||
if (!property.CanWrite)
|
||||
return null;
|
||||
|
||||
ParameterExpression objParm = Expression.Parameter(typeof(object), "o");
|
||||
ParameterExpression valueParm = Expression.Parameter(typeof(object), "value");
|
||||
var objParm = Expression.Parameter(typeof(object), "o");
|
||||
var valueParm = Expression.Parameter(typeof(object), "value");
|
||||
|
||||
return Expression.Lambda<Action<object, object>>(
|
||||
Expression.Assign(
|
||||
|
||||
Reference in new issue
Block a user