private object GetPropertyValue(object source, ConfigurationClassPropertyDefinition propertyModel) { var nestedProperty = propertyModel.GetPropertyValue(source); if (nestedProperty == null) { nestedProperty = propertyModel.NewItemInstance(); } var itemValue = BuildObject(nestedProperty, propertyModel.ConfigurationProperties); return(itemValue); }
private object GetConfigPropertyValueFromInput(JObject source, ConfigurationClassPropertyDefinition propertyModel, ConfigurationIdentity configIdentity, IEnumerable <ConfigurationSet> requiredConfigurationSets) { var propertySource = (JObject)source.GetValue(propertyModel.ConfigurationPropertyName.ToLowerCamelCase()); if (propertySource == null) { return(null); } var result = propertyModel.NewItemInstance(); return(UpdateObject(result, propertySource, propertyModel.ConfigurationProperties, configIdentity, requiredConfigurationSets)); }