PostSharp4.3//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.Common (in PostSharp.Patterns.Common.dll) Version: 4.3.48.0 (4.3.48.0)
Syntax
C#
protected bool DetachChild(
	Object item,
	Object itemParent,
	RelationshipInfo relationshipInfo
)

Parameters

item
Type: System.Object
The object to detach.
itemParent
Type: System.Object
Parent from which item is detached.
relationshipInfo
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