public static List <EdmPropertyPath> ToPropertyPathList( this EdmProperty property, List <EdmProperty> currentPath) { List <EdmPropertyPath> propertyPaths = new List <EdmPropertyPath>(); EdmPropertyExtensions.IncludePropertyPath(propertyPaths, currentPath, property); return(propertyPaths); }
private static void IncludePropertyPath( List <EdmPropertyPath> propertyPaths, List <EdmProperty> currentPath, EdmProperty property) { currentPath.Add(property); if (property.IsUnderlyingPrimitiveType) { propertyPaths.Add(new EdmPropertyPath((IEnumerable <EdmProperty>)currentPath)); } else if (property.IsComplexType) { foreach (EdmProperty property1 in property.ComplexType.Properties) { EdmPropertyExtensions.IncludePropertyPath(propertyPaths, currentPath, property1); } } currentPath.Remove(property); }