PostSharp 6.10 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Model Namespace / Aggregatable­Extensions Class / Aggregatable­Extensions Methods / Aggregatable­Extensions.​Get­Children Method

AggregatableExtensions.GetChildren Method

Gets the list of children of a specified parent object.

Namespace:  PostSharp.Patterns.Model
Assembly:  PostSharp.Patterns.Aggregation (in PostSharp.Patterns.Aggregation.dll) Version: (
public static IList<Object> GetChildren(
	this IAggregatable parent,
	ChildVisitorOptions options = ChildVisitorOptions.None


Type: PostSharp.Patterns.Model.IAggregatable
The parent object.
options (Optional)
Type: PostSharp.Patterns.Model.ChildVisitorOptions

Return Value

Type: IList<Object>
A list of children.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IAggregatable. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

This list may contain duplicates if an object has several parent-child relationships to the same parent. Use GetDistinctChildren(IAggregatable, ChildVisitorOptions) to get a list of distinct children.

See Also