PostSharpAPI ReferencePost­Sharp.​Patterns.​ModelPure­Attribute
Open sandboxFocus

PureAttribute Class

Custom attribute that, when applied on a method, specifies that this method is a pure function, i.e. the method always returns the same result given the same parameter values. In the context of NotifyPropertyChangedAttribute, it is also assumed that pure functions have only parameters of primitive types (System.Int32, String, ...). The System.Object parameter type is also accepted, but then it is assumed that instances passed are immutable (and changes to these objects will not be tracked).

Inheritance
System.Object
PureAttribute
Namespace: PostSharp.Patterns.Model
Assembly: PostSharp.Patterns.Model.dll
Syntax
[MulticastAttributeUsage]
public sealed class PureAttribute : MulticastAttribute, IValidableAnnotation

Constructors

Name Description
PureAttribute()

Methods

Name Description
CompileTimeValidate(Object)

Method invoked at build time to ensure that the aspect has been applied to the right target.