Class PropertyAttributeExtensions
A set of property extension methods for attributes.
Namespace: Unity.Properties
Syntax
public static class PropertyAttributeExtensions
Methods
WithAttribute<TProperty>(TProperty, Attribute)
Adds the specified attribute to the property.
Declaration
public static TProperty WithAttribute<TProperty>(this TProperty property, Attribute attribute)
    where TProperty : IProperty
Parameters
| Type | Name | Description | 
|---|---|---|
| TProperty | property | The property this method extends.  | 
| Attribute | attribute | The attribute to add.  | 
Returns
| Type | Description | 
|---|---|
| TProperty | The property this method extends.  | 
Type Parameters
| Name | Description | 
|---|---|
| TProperty | The property type.  | 
Exceptions
| Type | Condition | 
|---|---|
| InvalidOperationException | The property does not implement attributes.  | 
WithAttributes<TProperty>(TProperty, IEnumerable<Attribute>)
Adds the specified attributes to the property.
Declaration
public static TProperty WithAttributes<TProperty>(this TProperty property, IEnumerable<Attribute> attributes)
    where TProperty : IProperty
Parameters
| Type | Name | Description | 
|---|---|---|
| TProperty | property | The property this method extends.  | 
| IEnumerable<Attribute> | attributes | The attributes to add.  | 
Returns
| Type | Description | 
|---|---|
| TProperty | The property this method extends.  | 
Type Parameters
| Name | Description | 
|---|---|
| TProperty | The property type.  | 
Exceptions
| Type | Condition | 
|---|---|
| InvalidOperationException | The property does not implement attributes.  |