PostSharp / / API Reference / Post­Sharp.​Patterns.​Contracts / String­Length­Attribute

Class StringLengthAttribute

Inheritance
StringLengthAttribute
Namespace: PostSharp.Patterns.Contracts
Assembly: PostSharp.Patterns.Common.dll
Syntax
[HasConstraint]
public sealed class StringLengthAttribute : LocationContractAttribute, ILocationLevelAspect, IAspect

Constructors

Name Description
StringLengthAttribute(Int32)
StringLengthAttribute(Int32, Int32)

Properties

Name Description
MaximumLength
MinimumLength

Methods

Name Description
GetErrorMessage()
GetErrorMessageArguments()
ValidateValue(String, String, LocationKind, LocationValidationContext)
ValidateValueDynamic(Object, String, LocationKind, LocationValidationContext)