MetalamaAPI documentationPatterns APIMetalama.​Patterns.​ContractsContract­Helpers
Open sandboxFocus

ContractHelpers Class

Runtime helper methods for RangeAttribute.

Inheritance
System.Object
ContractHelpers
Namespace: Metalama.Patterns.Contracts
Assembly: Metalama.Patterns.Contracts.dll
Syntax
public static class ContractHelpers : Object

Properties

Name Description
EmailRegex

Gets or sets the regular expression used by EmailAttribute.

IsValidCreditCardNumber

Gets or sets the delegate used by CreditCardAttribute.

PhoneRegex

Gets or sets the regular expression used by PhoneAttribute.

UrlRegex

Gets or sets the regular expression used by UrlAttribute.

Methods

Name Description
GetRegex(String, RegexOptions)

Gets a cached regular expression. This method is used by JetBrains.Annotations.RegexPatternAttribute.