Class AdditionalLimitAttribute
- Namespace
 - Loehnert.TypeAndResult.Additional
 
- Assembly
 - Loehnert.TypeAndResult.dll
 
Attribute for an additional limit.
[MetadataAttribute]
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Property|AttributeTargets.Field, AllowMultiple = true)]
public class AdditionalLimitAttribute : Attribute, _Attribute
  - Inheritance
 - 
      
      
      AdditionalLimitAttribute
 
- Implements
 
- Inherited Members
 
Constructors
AdditionalLimitAttribute(IDictionary<string, object>)
Initializes a new instance of the AdditionalLimitAttribute class. This constructor is just used for the MEF handling.
public AdditionalLimitAttribute(IDictionary<string, object> metadata)
  Parameters
metadataIDictionary<string, object>All properties of all AdditionalLimitAttributes for the same object.
Remarks
Exceptions
- ArgumentNullException
 Thrown when
metadatais null.- ArgumentException
 Thrown when
metadatacontains no object for the key 'ParentType'.- ArgumentException
 Thrown when type of value for key 'ParentType' in
metadatais not of type Type[].
AdditionalLimitAttribute(Type)
Initializes a new instance of the AdditionalLimitAttribute class.
public AdditionalLimitAttribute(Type parentType)
  Parameters
parentTypeTypeType of the parent where the additional limit belongs to.
Exceptions
- ArgumentNullException
 Thrown when
parentTypeis null.
Properties
ParentType
Gets the type this additional limit instance belongs to.
public Type ParentType { get; }
  Property Value
Remarks
This property is used by the constructor AdditionalLimitAttribute(IDictionary<string, object>) and must be public for MEF meta data export.
ParentTypes
Gets the types this additional limit type belongs to.
public IEnumerable<Type> ParentTypes { get; }