Open sandboxFocus

Interface IValueAdapter

Wraps uncacheable classes or interfaces into cacheable objects, for instance an IEnumerable may be wrapped into an array.

Namespace: Metalama.Patterns.Caching.ValueAdapters
Assembly: Metalama.Patterns.Caching.dll
Syntax
public interface IValueAdapter

Properties

Name Description
IsAsyncSupported

Gets a value indicating whether the GetStoredValueAsync(object?, CancellationToken) method is supported.

Methods

Name Description
GetExposedValue(object?)

Gets the value that should be exposed to the consuming application, i.e. typically the return value of the cached method.

GetStoredValue(object?)

Gets the value that should be stored in the cache.

GetStoredValueAsync(object?, CancellationToken)

Asynchronously gets the value that should be stored in the cache.

Extension Methods