private static void ProcessTransformation(ConfigSection currentConfig, JToken transformation) { var transformationConfig = new TransformationConfig(); foreach (var item in transformation) { if (item.Type == JTokenType.Property) { var property = (JProperty)item; var propertyName = property.Name.ToString(); var propertyValue = property.Value; switch (propertyName) { case "_type": transformationConfig.Type = propertyValue.ToString(); break; default: transformationConfig.ConfigAttributes[propertyName] = propertyValue; break; } } } if (!string.IsNullOrWhiteSpace(transformationConfig.Type)) { currentConfig.Transformations.Add(transformationConfig); } }
private static void ProcessTransformation(ConfigSection currentConfig, JToken transformation) { var transformationConfig = new TransformationConfig(); foreach (var item in transformation) { if (item.Type == JTokenType.Property) { var property = (JProperty)item; var propertyName = property.Name.ToString(); var propertyValue = property.Value; switch (propertyName) { case "_type": transformationConfig.Type = propertyValue.ToString(); break; default: transformationConfig.ConfigAttributes[propertyName] = propertyValue; break; } } } if (!string.IsNullOrWhiteSpace(transformationConfig.Type)) { currentConfig.Transformations.Add(transformationConfig); } }