Open sandboxFocus

Method WithBackend

WithBackend(CachingBackend, bool)

Specifies a specific instance of the CachingBackend class to be used by the CachingService.

Declaration
ICachingServiceBuilder WithBackend(CachingBackend backend, bool ownsBackend = false)
Parameters
Type Name Description
CachingBackend backend

A CachingBackend.

bool ownsBackend

A value indicating whether the CachingBackend should be initialized and disposed of by the CachingService. The default value is false.

Returns
Type Description
ICachingServiceBuilder

WithBackend(Func<CachingBackendBuilder, ConcreteCachingBackendBuilder>, bool)

Specifies how to create.

Declaration
ICachingServiceBuilder WithBackend(Func<CachingBackendBuilder, ConcreteCachingBackendBuilder> action, bool ownsBackend = true)
Parameters
Type Name Description
Func<CachingBackendBuilder, ConcreteCachingBackendBuilder> action

An action that uses a CachingBackendBuilder to specify how to build a CachingBackend.

bool ownsBackend

A value indicating whether the CachingBackend should be initialized and disposed of by the CachingService. The default value is true.

Returns
Type Description
ICachingServiceBuilder