private AttributeData GetMergedResult(string attribute, AttributeData baseField) { List <string> source = new List <string>(); IExtendableField extendableBaseField = baseField.Value as IExtendableField; IExtendableField mergedResult = GetExtendableField(attribute, source); if (extendableBaseField == null) { return new AttributeData { Value = mergedResult, Source = string.Join(",", source) } } ; if (mergedResult == null) { return(baseField); } return(new AttributeData { Value = mergedResult.Merge(extendableBaseField), Source = baseField.Source + "," + string.Join(",", source), IsInherited = true }); }
private IExtendableField MergeExtendableFields(IExtendableField field, IExtendableField parent) { if (field == null) { return(parent); } return(field.Merge(parent)); }