MetalamaAPI documentationPatterns APIMetalama.​Patterns.​MemoizationMemoize­Attribute
Open sandboxFocus

MemoizeAttribute Class

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.

Inheritance
System.Object
MemoizeAttribute
Namespace: Metalama.Patterns.Memoization
Assembly: Metalama.Patterns.Memoization.dll
Syntax
public sealed class MemoizeAttribute : Attribute, IAspect<IMethod>, IEligible<IMethod>, IAspect<IProperty>, IAspect, ICompileTimeSerializable, ITemplateProvider, IEligible<IProperty>

Constructors

Name Description
MemoizeAttribute()

Explicit Interface Implementations

Name Description
IAspect<IMethod>.BuildAspect(IAspectBuilder<IMethod>)
IAspect<IProperty>.BuildAspect(IAspectBuilder<IProperty>)
IEligible<IMethod>.BuildEligibility(IEligibilityBuilder<IMethod>)
IEligible<IProperty>.BuildEligibility(IEligibilityBuilder<IProperty>)