public T Create <T>(ObjectCreationSettingsCollection mappings) { if (mappings == null) { throw new ArgumentException("mappings is null"); } return(ObjectCreationAndPopulationFactory.Create <T>(mappings)); }
/// <summary> /// Allows a model to have its values overriden with the given config section, only values that exist in the config section will override properties in the model /// </summary> /// <typeparam name="T"></typeparam> /// <param name="model"></param> public void Populate <T>(T model) { var settings = CreateCreationSettingsCollection(valuesAsDictionary, null, true); ObjectCreationAndPopulationFactory.PopulateFieldsFromValuesItems(model, settings.GetValidPropertySettings(), settings.OnlySetPublicProperties); }