Skip to content

Commit

Permalink
todo
Browse files Browse the repository at this point in the history
  • Loading branch information
stormaref committed Feb 11, 2023
1 parent 8c384f1 commit b985a35
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Mapster/Adapters/ClassAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,14 @@ protected override Expression CreateBlockExpression(Expression source, Expressio
{
value = member.Getter.NotNullReturn(value);
}

var destinationPropertyInfo = (PropertyInfo)member.DestinationMember.Info!;
if (destinationPropertyInfo.IsInitOnly())
{
//Todo build expression here instead of binding value
// arg.DestinationType.GetProperty(destinationPropertyInfo.Name).SetValue();
}

var bind = Expression.Bind((MemberInfo)member.DestinationMember.Info!, value);
lines.Add(bind);
}
Expand Down

0 comments on commit b985a35

Please sign in to comment.