ReusableResourceStore<TResource,TConstructorParameter>.CanReuse Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.