Class ReadingBaseAttribute
- Namespace
- Acuit.Pinpoint.IO.Testing.DataAnnotations
- Assembly
- Acuit.Pinpoint.IO.Testing.Abstractions.dll
The base class for an attribute that marks a property as a reading.
public abstract class ReadingBaseAttribute : Attribute, _Attribute
- Inheritance
-
ReadingBaseAttribute
- Implements
- Derived
- Inherited Members
Constructors
ReadingBaseAttribute(int)
Initializes a new instance of the ReadingBaseAttribute class.
protected ReadingBaseAttribute(int order)
Parameters
order
intThe relative order of this reading.
Properties
DisplayName
public string DisplayName { get; set; }
Property Value
Name
Gets or sets the display name. If this is null, the property name will be used.
public string Name { get; set; }
Property Value
Order
Gets the relative order of this reading.
public int Order { get; }
Property Value
Units
Gets or sets the units, or null if the reading has no units.
public string Units { get; set; }
Property Value
Methods
GetReadingDescriptor(PropertyInfo)
Gets the reading descriptor for the reading.
public abstract IAttributedReadingDescriptor GetReadingDescriptor(PropertyInfo propertyInfo)
Parameters
propertyInfo
PropertyInfoThe property to which this attribute is applied.
Returns
Exceptions
- ArgumentNullException
propertyInfo
is null.- InvalidOperationException
propertyInfo
is not compatible with this reading attribute.