Class PureAttribute
- Namespace
- Velvet
- Assembly
- Velvet.Docs.dll
Marker attribute used by the Source Generator / Analyzer to treat a method as pure. Velvet can declare purity standalone, without depending on System.Diagnostics.Contracts.PureAttribute or JetBrains Annotations. The declaration is trusted and not verified.
[AttributeUsage(AttributeTargets.Method, Inherited = false)]
public sealed class PureAttribute : Attribute
- Inheritance
-
objectAttributePureAttribute
Remarks
Because Inherited = false, overriding methods do not inherit the base declaration.
Derived methods that claim purity must explicitly re-apply the attribute.