TokenInMemoryLruCacheTKey, TValueTryGet(FuncTKey, TValue, Boolean, TValue) - метод
Attempts to retrieve the cache value that matches the specified condition.
Пространство имён: Tessa.Tokens.CachingСборка: Tessa (в Tessa.dll) Версия: 4.1.3+7e2b1422f9b8c7c41fbbc4b151a843bed05319ab
public virtual bool TryGet(
Func<TKey, TValue, bool> predicate,
out TValue value
)
Public Overridable Function TryGet (
predicate As Func(Of TKey, TValue, Boolean),
<OutAttribute> ByRef value As TValue
) As Boolean
public:
virtual bool TryGet(
Func<TKey, TValue, bool>^ predicate,
[OutAttribute] TValue% value
)
abstract TryGet :
predicate : Func<'TKey, 'TValue, bool> *
value : 'TValue byref -> bool
override TryGet :
predicate : Func<'TKey, 'TValue, bool> *
value : 'TValue byref -> bool
- predicate FuncTKey, TValue, Boolean
- A function to test each cache entry.
- value TValue
- The cache value if retrieval is successful; otherwise, .
Boolean if the value was found; otherwise,
.
ITokenCacheTKey, TValueTryGet(FuncTKey, TValue, Boolean, TValue)
This method will automatically trigger cleanup if necessary, before attempting to retrieve the value.