PostSharpAPI ReferencePost­Sharp.​Patterns.​Model.​Type­AdaptersType­AdapterDetach­Child
Open sandboxFocus

TypeAdapter.DetachChild Method

DetachChild(Object, Object, RelationshipInfo)

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.

Declaration
protected bool DetachChild(object item, object itemParent, RelationshipInfo relationshipInfo)
Parameters
Type Name Description
System.Object item

The object to detach.

System.Object itemParent

Parent from which item is detached.

RelationshipInfo relationshipInfo

Relationship of item with respect to itemParent.

Returns
Type Description
System.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.