Table of Contents

Class AssociatedTypeAttributeAttribute

Namespace
PolyType.Abstractions
Assembly
PolyType.dll

An attribute to apply to other attribute classes that accept one or more Type arguments that should be considered associated types to whatever type the other attribute is applied to.

[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public class AssociatedTypeAttributeAttribute : Attribute
Inheritance
AssociatedTypeAttributeAttribute
Inherited Members

Constructors

AssociatedTypeAttributeAttribute(string, TypeShapeRequirements)

Initializes a new instance of the AssociatedTypeAttributeAttribute class.

public AssociatedTypeAttributeAttribute(string parameterOrNamedArgumentName, TypeShapeRequirements requirements)

Parameters

parameterOrNamedArgumentName string

The name of the attribute constructor parameter or named argument (i.e. attribute property) whose Type or Type array argument should be included as associated types.

requirements TypeShapeRequirements

The requirements to apply to each associated type. Only applicable to object shapes. All other shapes (e.g. collections, enums, unions) are always completely defined.