PostSharp 6.10 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Model Namespace / Aggregatable­Extensions Class / Aggregatable­Extensions Methods / Aggregatable­Extensions.​Visit­Self­And­Descendants Method

AggregatableExtensions.VisitSelfAndDescendants Method

Executes a ChildVisitor for the a specified parent object and all its descendants.

Namespace:  PostSharp.Patterns.Model
Assembly:  PostSharp.Patterns.Aggregation (in PostSharp.Patterns.Aggregation.dll) Version: (
public static bool VisitSelfAndDescendants(
	this IAggregatable parent,
	DescendantVisitor visitor,
	ChildVisitorOptions options = ChildVisitorOptions.None,
	Object state = null


Type: PostSharp.Patterns.Model.IAggregatable
The parent object.
Type: PostSharp.Patterns.Model.DescendantVisitor
The action to execute.
options (Optional)
Type: PostSharp.Patterns.Model.ChildVisitorOptions
state (Optional)
Type: System.Object

Return Value

Type: Boolean

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).
See Also