public object Assemble(ValueModel model, Type expectedType, AssemblyContext context) { Type type = model.IsTypeImplicit ? expectedType : model.GetModelType(); object obj = CreateInstance(type); _populator.Populate(obj, model as ObjectModel, context); return(obj); }
public object Assemble(ValueModel model, Type expectedType, AssemblyContext context) { if (model is NullModel) { return(null); } Type type = model.IsTypeImplicit ? expectedType : model.GetModelType(); return(GetAssembler(type).Assemble(model, type, context)); }