Suppose we have Modelseveral properties on it, and we want to create a decorator class for this model to improve it with some additional properties. Now we want to create a new instance DecoratedModelfilled with all the property values Model, possibly using the constructor with Modelas a parameter:
public class DecoratedModel : Model
{
public DecoratedModel(Model baseModel)
{
}
}
What would be the most common, concise way to populate DecoratedModelout Model?
source
share