MetalamaAPI documentationPatterns APIMetalama.​Patterns.​Caching.​Value­AdaptersValue­Adapter<T>
Open sandboxFocus

ValueAdapter<T> Class

An abstract implementation of IValueAdapter<T>.

Inheritance
System.Object
ValueAdapter<T>
Namespace: Metalama.Patterns.Caching.ValueAdapters
Assembly: Metalama.Patterns.Caching.dll
Syntax
public abstract class ValueAdapter<T> : Object, IValueAdapter<T>, IValueAdapter
Type Parameters
Name Description
T

Type of the exposed value, i.e. typically return type of the cached method.

Constructors

Name Description
ValueAdapter()

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(T)

Gets the value that should be stored in the cache.

GetStoredValueAsync(T, CancellationToken)

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

Explicit Interface Implementations

Name Description
IValueAdapter.GetExposedValue(Object)

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

IValueAdapter.GetStoredValue(Object)

Gets the value that should be stored in the cache.

IValueAdapter.GetStoredValueAsync(Object, CancellationToken)

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