<PackageReference Include="Polly" Version="8.0.0-beta.2" />

GenericTtlStrategy<TResult>

class GenericTtlStrategy<TResult> : ITtlStrategy<TResult>
using System; using System.Runtime.CompilerServices; namespace Polly.Caching { [System.Runtime.CompilerServices.NullableContext(1)] [System.Runtime.CompilerServices.Nullable(0)] internal class GenericTtlStrategy<[System.Runtime.CompilerServices.Nullable(2)] TResult> : ITtlStrategy<TResult> { private readonly ITtlStrategy _wrappedTtlStrategy; internal GenericTtlStrategy(ITtlStrategy ttlStrategy) { if (ttlStrategy == null) throw new ArgumentNullException("ttlStrategy"); _wrappedTtlStrategy = ttlStrategy; } public Ttl GetTtl(Context context, [System.Runtime.CompilerServices.Nullable(2)] TResult result) { return _wrappedTtlStrategy.GetTtl(context, result); } } }