TreeExtensionMethods
Methods
Enumerate over all pears in a tree and their associated sites.
Enumerate over all pears in a tree and their associated sites.
Process a tree and automatically convert all linear enumerations and trees stored as items into new twigs and sub-trees. This method is recursive and keeps replacing embedded collections until no more changes happen.
public static ITree ExpandEmbeddedCollections()
this ITree
tree,
Tree to expand.
options,
Expansion options.
customExpanders
Collection of types to be considered as linear collections. Note that each type in this set must also implement IEnumerable or it will not be considered.
Returns: Expanded tree, or null if no embedded collections were found.
Process a tree and automatically convert all linear enumerations and trees stored as items into new twigs and sub-trees. This method is recursive and keeps replacing embedded collections until no more changes happen.
public static ITree ExpandEmbeddedCollections()
this ITree
tree,
Tree to expand.
customExpanders
Collection of types to be considered as linear collections. Note that each type in this set must also implement IEnumerable or it will not be considered.
Returns: Expanded tree, or null if no embedded collections were found.
Process a twig and automatically convert all linear enumerations and trees stored as items into new twigs and sub-trees. This method is not recursive so must be called iteratively until no more changes are made. Consider using the overload of this method which takes an ITree and which is recursive.
public static ITwig[] ExpandEmbeddedCollections()
this ITwig
twig,
Twig to expand.
options,
Expansion options. Note that ExpansionOptions.Recurse and ExpansionOptions.Recurse are not relevant to this method.
customExpanders
Collection of types to be considered as linear collections. Note that each type in this set must also implement IEnumerable or it will not be considered.
Returns: Array of twigs with automatic incremental paths, or null if no embedded collections were found.
Process a twig and automatically convert all linear enumerations and trees stored as items into new twigs and sub-trees. This method is not recursive so must be called iteratively until no more changes are made. Consider using the overload of this method which takes an ITree and which is recursive.
public static ITwig[] ExpandEmbeddedCollections()
this ITwig
twig,
Twig to expand.
customExpanders
Collection of types to be considered as linear collections. Note that each type in this set must also implement IEnumerable or it will not be considered.
Returns: Array of twigs with automatic incremental paths, or null if no embedded collections were found.
Find all places where IPear instances are assigned as twig items and promote them to the proper structure.
Returns: Repaired tree or null if no repairs were needed.
Find all places where IPear instances are assigned as twig items and promote them to the proper structure.
Returns: Repaired twig or null if no repairs were needed.