Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Contracts Namespace / Location­Contract­Attribute Class / Location­Contract­Attribute Methods / Location­Contract­Attribute.​Validate­Value­Dynamic Method

LocationContractAttribute.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: 6.1.5.0 (6.1.5.0)
Syntax
C#
public virtual 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: Exception
An Exception if the value is invalid, or null if the value is valid.
See Also