Table of Contents

Class AdditionalParameterAttribute

Namespace
Loehnert.TypeAndResult.Additional
Assembly
Loehnert.TypeAndResult.dll

Attribute for an additional type data parameter.

[MetadataAttribute]
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Property|AttributeTargets.Field, AllowMultiple = true)]
public class AdditionalParameterAttribute : Attribute, _Attribute
Inheritance
AdditionalParameterAttribute
Implements
Inherited Members

Constructors

AdditionalParameterAttribute(IDictionary<string, object>)

Initializes a new instance of the AdditionalParameterAttribute class. This constructor is just used for the MEF handling.

public AdditionalParameterAttribute(IDictionary<string, object> metadata)

Parameters

metadata IDictionary<string, object>

All properties of all AdditionalParameterAttributes for the same object.

Remarks

Exceptions

ArgumentNullException

Thrown when metadata is null.

ArgumentException

Thrown when metadata contains no object for the key 'ParentType'.

ArgumentException

Thrown when type of value for key 'ParentType' in metadata is not of type Type[].

AdditionalParameterAttribute(Type)

Initializes a new instance of the AdditionalParameterAttribute class.

public AdditionalParameterAttribute(Type parentType)

Parameters

parentType Type

Type of the parent where the additional parameter belongs to.

Properties

ParentType

Gets the type this additional parameter instance belongs to.

public Type ParentType { get; }

Property Value

Type

Remarks

This property is used by the constructor AdditionalParameterAttribute(IDictionary<string, object>) and must be public for MEF meta data export.

ParentTypes

Gets the types this additional parameter type belongs to.

public IEnumerable<Type> ParentTypes { get; }

Property Value

IEnumerable<Type>