PostSharp 2023.0 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Model.​Type­Adapters Namespace / Type­Adapter Class / Type­Adapter Methods / Type­Adapter.​Detach­Child Method

TypeAdapter.DetachChild Method

Detaches an item from its parent. This method is typically invoked by implementations of DetachFromParent(Object, Object, RelationshipInfo) to detach items or children from the parent.

Namespace:  PostSharp.Patterns.Model.TypeAdapters
Assembly:  PostSharp.Patterns.Aggregation (in PostSharp.Patterns.Aggregation.dll) Version: 2023.0.3.0 (2023.0.3.0)
protected bool DetachChild(
	Object item,
	Object itemParent,
	RelationshipInfo relationshipInfo


Type: System.Object
The object to detach.
Type: System.Object
Parent from which item is detached.
Type: PostSharp.Patterns.Model.RelationshipInfo
Relationship of item with respect to itemParent.

Return Value

Type: Boolean
true if the current object has been fully detached, i.e. is no longer attached to its parent by any other relationship, or false if the current object is still attached to the parent by some relationship.
See Also