Class UrlAttribute
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 URL starting with http://
, https://
or ftp://
.
Null strings are accepted and do not
throw an exception.
Inheritance
Namespace: PostSharp.Patterns.Contracts
Assembly: PostSharp.Patterns.Common.dll
Syntax
[AspectConfiguration(SerializerType = null)]
public sealed class UrlAttribute : RegularExpressionAttribute, ILocationLevelAspect, IAspect
Constructors
Name | Description |
---|---|
UrlAttribute() | Initializes a new UrlAttribute. |
Methods
Name | Description |
---|---|
GetErrorMessage() | |
GetErrorMessageArguments() |