Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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));
        }