ReusableResourceStore<TResource,TConstructorParameter>.CanReuse Method

Definition

Validates that an already-cached resource value is safe to reuse when Acquire is called.

protected:
 virtual bool CanReuse(TResource value, TConstructorParameter parameter);
protected:
 virtual bool CanReuse(TResource value, TConstructorParameter parameter);
 virtual bool CanReuse(TResource value, TConstructorParameter parameter);
protected virtual bool CanReuse (TResource value, TConstructorParameter parameter);
abstract member CanReuse : 'Resource * 'ConstructorParameter -> bool
override this.CanReuse : 'Resource * 'ConstructorParameter -> bool
Protected Overridable Function CanReuse (value As TResource, parameter As TConstructorParameter) As Boolean

Parameters

value
TResource

The cached value that is about to be reused during Acquire.

parameter
TConstructorParameter

The parameter that would be used to construct a new value.

Returns

True if the object is in a reusable state, otherwise false.

Applies to