Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Model.​Type­Adapters Namespace / Type­Adapter Class

TypeAdapter Class

Adapter that implements the features otherwise added by AggregatableAttribute to external or third-party types.
Inheritance Hierarchy
System.Object
  PostSharp.Patterns.Model.TypeAdapters.TypeAdapter

Namespace:  PostSharp.Patterns.Model.TypeAdapters
Assembly:  PostSharp.Patterns.Aggregation (in PostSharp.Patterns.Aggregation.dll) Version: 6.1.5.0 (6.1.5.0)
Syntax
C#
public class TypeAdapter

The TypeAdapter type exposes the following members.

Constructors
  NameDescription
Protected methodTypeAdapter(Boolean)
Initializes a new TypeAdapter for no specific type.
Protected methodTypeAdapter(Type)
Initializes a new TypeAdapter for a specific AdaptedType.
Properties
  NameDescription
Public propertyAdaptedType
Gets the AdaptedType adapted by the current TypeAdapter, or null if the current TypeAdapter is not specific to any AdaptedType.
Public propertyEligibleRelationshipKind
Determines which kind of relationships the adapted type can enter with respect to the parent object.
Public propertyIsAnyInstanceImmutable
Determines whether any instance of this type or of any derived class is immutable.
Public propertyIsAnyInstanceThreadSafe
Determines whether any instance of this type or of any derived class can be safely shared by several threads.
Public propertyIsImmutable
Determines whether the adapted type is immutable.
Public propertyIsThreadSafe
Determines whether instances of this type can be safely shared by several threads.
Public propertyObjectReferenceTypes
Gets a list of all types referenced from the adapted type.
Methods
  NameDescription
Protected methodAttachChild
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.
Public methodAttachToParent
Attaches an object to a parent object.
Protected methodDetachChild
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.
Public methodDetachFromParent
Detaches an object from its parent object.
Public methodVisitChildren
Visit children or collection items.
Remarks

Type adapters must be registered using the RegisterTypeAdapterAttribute custom attribute.

See Also