Custom attribute that, when added to a get-only property or non-void parameterless method, causes the result of this property or method to be indefinitely stored. All calls to the target property or method are guaranteed to return the same value or object reference. The underlying implementation of the property or method is not guaranteed to be executed only once. The cached result is stored in the type itself.
Implements
Namespace: Metalama.Patterns.Memoization
Assembly: Metalama.Patterns.Memoization.dll
Syntax
[AttributeUsage(AttributeTargets.Method|AttributeTargets.Property)]
public sealed class MemoizeAttribute : Attribute, IAspect<IMethod>, IEligible<IMethod>, IAspect<IProperty>, IAspect, ICompileTimeSerializable, ITemplateProvider, IEligible<IProperty>
Constructors
Name | Description |
---|---|
MemoizeAttribute() |