StringLengthAttribute.ValidateValueDynamic Method |
Validates a weakly-typed (boxed) value, typically the value of a dependency property or an attached property.
Namespace: PostSharp.Patterns.Contracts
Assembly: PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 2023.0.3.0 (2023.0.3.0)
C#
public override Exception ValidateValueDynamic( Object value, string locationName, LocationKind locationKind, LocationValidationContext context )
Parameters
- value
- Type: System.Object
Value. - locationName
- Type: System.String
The name of the property. - locationKind
- Type: PostSharp.Reflection.LocationKind
The kind of location (typically a Property). - context
- Type: PostSharp.Aspects.LocationValidationContext
Why or when the value is being validated.
Return Value
Type: ExceptionAn Exception if the value is invalid, or null if the value is valid.