Adapter that implements the features otherwise added by AggregatableAttribute to external or third-party types.
Namespace: PostSharp.Patterns.Model.TypeAdapters
Assembly: PostSharp.Patterns.Aggregation.dll
Syntax
public class TypeAdapterRemarks
Type adapters must be registered using the RegisterTypeAdapterAttribute custom attribute.
Constructors
| Name | Description |
|---|---|
| TypeAdapter(bool) | Initializes a new TypeAdapter for no specific type. |
| TypeAdapter(Type) | Initializes a new TypeAdapter for a specific AdaptedType. |
Properties
| Name | Description |
|---|---|
| AdaptedType | Gets the AdaptedType adapted by the current TypeAdapter, or |
| EligibleRelationshipKind | Determines which kind of relationships the adapted type can enter with respect to the parent object. |
| IsAnyInstanceImmutable | Determines whether any instance of this type or of any derived class is immutable. |
| IsAnyInstanceThreadSafe | Determines whether any instance of this type or of any derived class can be safely shared by several threads. |
| IsImmutable | Determines whether the adapted type is immutable. |
| IsThreadSafe | Determines whether instances of this type can be safely shared by several threads. |
| ObjectReferenceTypes | Gets a list of all types referenced from the adapted type. |
Methods
| Name | Description |
|---|---|
| AttachChild(object, RelationshipInfo, IAttacher, object) | Attaches an item to a parent. This method is typically invoked by implementations of AttachToParent(object, RelationshipInfo, IAttacher, object) to attach items or children to the parent. |
| AttachToParent(object, RelationshipInfo, IAttacher, object) | Attaches an object to a parent object. |
| 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. |
| DetachFromParent(object, object, RelationshipInfo) | Detaches an object from its parent object. |
| VisitChildren(object, ChildVisitor, ChildVisitorOptions, object) | Visit children or collection items. |