EnumDataTypeAttribute Class
Custom attribute that, when added to a field, property or parameter, throws
an ArgumentException if the target is assigned a value that
is not a valid member of an enumeration.
Inheritance
EnumDataTypeAttribute
Assembly: PostSharp.Patterns.Common.dll
Syntax
[HasConstraint]
public sealed class EnumDataTypeAttribute : LocationContractAttribute, ILocationLevelAspect, IAspect
Constructors
Properties
Name |
Description |
EnumType
|
Gets the enumeration type.
|
Methods
Name |
Description |
GetErrorMessage()
|
Gets unformatted error message as defined by the instance.
|
GetErrorMessageArguments()
|
Gets values of additional arguments for error message associated with particular instance of LocationContractAttribute.
There arguments can be referenced from error message string by {4} , {5} and so on.
|
ValidateValue(Byte, String, LocationKind, LocationValidationContext)
|
|
ValidateValue(Int16, String, LocationKind, LocationValidationContext)
|
|
ValidateValue(Int32, String, LocationKind, LocationValidationContext)
|
|
ValidateValue(Int64, String, LocationKind, LocationValidationContext)
|
|
ValidateValue(Nullable<Byte>, String, LocationKind, LocationValidationContext)
|
|
ValidateValue(Nullable<Int16>, String, LocationKind, LocationValidationContext)
|
|
ValidateValue(Nullable<Int32>, String, LocationKind, LocationValidationContext)
|
|
ValidateValue(Nullable<Int64>, String, LocationKind, LocationValidationContext)
|
|
ValidateValue(Nullable<SByte>, String, LocationKind, LocationValidationContext)
|
|
ValidateValue(Nullable<UInt16>, String, LocationKind, LocationValidationContext)
|
|
ValidateValue(Nullable<UInt32>, String, LocationKind, LocationValidationContext)
|
|
ValidateValue(Nullable<UInt64>, String, LocationKind, LocationValidationContext)
|
|
ValidateValue(SByte, String, LocationKind, LocationValidationContext)
|
|
ValidateValue(UInt16, String, LocationKind, LocationValidationContext)
|
|
ValidateValue(UInt32, String, LocationKind, LocationValidationContext)
|
|
ValidateValue(UInt64, String, LocationKind, LocationValidationContext)
|
|
ValidateValueDynamic(Object, String, LocationKind, LocationValidationContext)
|
|
ValidateValueString(String, String, LocationKind, LocationValidationContext)
|
|