A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/MapsterMapper/Mapster/issues/374 below:

Non-unform mapping to get-only properties of a target interface · Issue #374 · MapsterMapper/Mapster · GitHub

Using Mapster 7,2,0, when mapping to an interface with both readonly and writeable properties results in readonly properties assigned default values. Mapping to an interface with readonly properties only results in readonly properties being populated with values from the source, e.g.

public interface ITarget // GetOnlyProperty will be assigned value from source
{
  int GetOnlyProperty {get;}
}
public interface ITargetWithGetSetProperties // GetOnlyProperty will be 0, GetSetProperty will be assigned value from source
{
  int GetOnlyProperty {get;}
  int GetSetProperty {get;set;}
}

edgythorn, qihangnet and sharkyfm


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4