PostSharpAPI ReferencePost­Sharp.​Patterns.​Caching.​Value­AdaptersIValue­Adapter
Open sandboxFocus

IValueAdapter Interface

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

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

Properties

Name Description
IsAsyncSupported

Determines 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.