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

FieldRule Class

Exposes a method GetRelationshipInfo(FieldInfo) that allows to mark a field as Child or Reference programmatically, without custom attribute.
Inheritance Hierarchy
System.Object
  PostSharp.Patterns.Model.TypeAdapters.FieldRule

Namespace:  PostSharp.Patterns.Model.TypeAdapters
Assembly:  PostSharp.Patterns.Aggregation (in PostSharp.Patterns.Aggregation.dll) Version: 5.0.51.0 (5.0.51.0)
Syntax
C#
public abstract class FieldRule

The FieldRule type exposes the following members.

Constructors
  NameDescription
Protected methodFieldRule
Initializes a new instance of the FieldRule class
Methods
  NameDescription
Public methodGetRelationshipInfo
Gets the RelationshipInfo of a given field.
Extension Methods
  NameDescription
Public Extension MethodQueryInterface<T>
Gets the implementation of a specified interface for the specified object.
(Defined by QueryInterfaceExtensions.)
Remarks

Field rules must be registered using the RegisterFieldRuleAttribute custom attribute.

See Also