PostSharp6.2/API Reference/Post­Sharp.​Patterns.​Model.​Type­Adapters Namespace/Type­Adapter Class/Type­Adapter Methods/Type­Adapter.​Detach­From­Parent Method

TypeAdapter.DetachFromParent Method

Detaches an object from its parent object.

Namespace:  PostSharp.Patterns.Model.TypeAdapters
Assembly:  PostSharp.Patterns.Aggregation (in PostSharp.Patterns.Aggregation.dll) Version: 6.2.13.0 (6.2.13.0)
Syntax
C#
public virtual bool DetachFromParent(
	Object obj,
	Object parent,
	RelationshipInfo relationshipInfo
)

Parameters

obj
Type: System.Object
An instance of the adapted type.
parent
Type: System.Object
The object from which obj is detached.
relationshipInfo
Type: PostSharp.Patterns.Model.RelationshipInfo
Relationship of obj with respect to parent.

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.
Remarks

This method is equivalent to DetachFromParent().

Implementations of this method can use the DetachChild(Object, Object, RelationshipInfo) method to detach items from the parent.

See Also