Open sandboxFocus

Class ConstantAttribute

Adds an observability contract that guarantees that the outputs of the method depend neither on any non-constant property of input arguments nor on any other non-input factor. When applied to a type, the guarantee must hold for all methods.

Inheritance
ConstantAttribute
Namespace: Metalama.Patterns.Observability
Assembly: Metalama.Patterns.Observability.dll
Syntax
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Method)]
public sealed class ConstantAttribute : Attribute, IHierarchicalOptionsProvider

Constructors

Name Description
ConstantAttribute()