PostSharp.ILAPI ReferencePost­Sharp.​ConstraintsNaming­Convention­Attribute
Open sandboxFocus

NamingConventionAttribute Class

Custom attribute that, when applied to a target class or an interface, validates that classes and interfaces derived from this target class or interface respect a giving naming convention, i.e. that their names matches a given pattern.

Inheritance
NamingConventionAttribute
Namespace: PostSharp.Constraints
Assembly: PostSharp.dll
Syntax
[MulticastAttributeUsage]
public sealed class NamingConventionAttribute : ScalarConstraint, IScalarConstraint, IConstraint

Constructors

Name Description
NamingConventionAttribute(String)

Initializes a new NamingConventionAttribute.

Properties

Name Description
Severity

Gets or sets the severity of messages reporting violations of the current naming convention.

Methods

Name Description
ValidateCode(Object)

Validates the element of code to which the constraint is applied.

ValidateConstraint(Object)

Validates the fact that the constraint has been applied on a valid element of code. When this method returns false, the constraint is silently ignored.