5 instantiations of HybridCacheEntryContext
Microsoft.Extensions.Caching.Abstractions (1)
Hybrid\HybridCache.cs (1)
165var context = new HybridCacheEntryContext(packed.Options);
Microsoft.Extensions.Caching.Hybrid (3)
Internal\DefaultHybridCache.cs (1)
189? factory(state, new HybridCacheEntryContext(options), cancellationToken) : default;
Internal\DefaultHybridCache.StampedeStateT.cs (2)
78_context = new HybridCacheEntryContext(options); 114_context = new HybridCacheEntryContext(options);
Microsoft.Extensions.Caching.Hybrid.Tests (1)
FactoryOptionsTests.cs (1)
392var context = new HybridCacheEntryContext(null);
31 references to HybridCacheEntryContext
Microsoft.Extensions.Caching.Abstractions (21)
Hybrid\HybridCache.cs (18)
139/// <param name="factory">Provides the underlying data service if the data is not available in the cache. The <see cref="HybridCacheEntryContext"/> passed to the factory allows it to influence cache entry options based on the result.</param> 145Func<TState, HybridCacheEntryContext, CancellationToken, ValueTask<T>> factory, 165var context = new HybridCacheEntryContext(packed.Options); 222/// <param name="factory">Provides the underlying data service if the data is not available in the cache. The <see cref="HybridCacheEntryContext"/> passed to the factory allows it to influence cache entry options based on the result.</param> 228Func<HybridCacheEntryContext, CancellationToken, ValueTask<T>> factory, 238/// <param name="factory">Provides the underlying data service if the data is not available in the cache. The <see cref="HybridCacheEntryContext"/> passed to the factory allows it to influence cache entry options based on the result.</param> 245Func<HybridCacheEntryContext, CancellationToken, ValueTask<T>> factory, 258/// <param name="factory">Provides the underlying data service if the data is not available in the cache. The <see cref="HybridCacheEntryContext"/> passed to the factory allows it to influence cache entry options based on the result.</param> 266Func<TState, HybridCacheEntryContext, CancellationToken, ValueTask<T>> factory, 277/// <param name="factory">Provides the underlying data service if the data is not available in the cache. The <see cref="HybridCacheEntryContext"/> passed to the factory allows it to influence cache entry options based on the result.</param> 284Func<HybridCacheEntryContext, CancellationToken, ValueTask<T>> factory, 298/// <param name="factory">Provides the underlying data service if the data is not available in the cache. The <see cref="HybridCacheEntryContext"/> passed to the factory allows it to influence cache entry options based on the result.</param> 306Func<TState, HybridCacheEntryContext, CancellationToken, ValueTask<T>> factory, 325public static readonly Func<Func<HybridCacheEntryContext, CancellationToken, ValueTask<T>>, HybridCacheEntryContext, CancellationToken, ValueTask<T>> Instance = 332public readonly Func<TState, HybridCacheEntryContext, CancellationToken, ValueTask<T>> Factory; 336public HybridCacheEntryContext? Context; 338public DefaultImplState(TState state, Func<TState, HybridCacheEntryContext, CancellationToken, ValueTask<T>> factory, HybridCacheEntryOptions? options)
Hybrid\HybridCacheEntryContext.cs (1)
22/// Initializes a new instance of the <see cref="HybridCacheEntryContext"/> class, seeding its values from
Hybrid\HybridCacheEntryOptions.cs (2)
17/// <see cref="HybridCache.GetOrCreateAsync{TState, T}(string, TState, Func{TState, HybridCacheEntryContext, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask{T}}, HybridCacheEntryOptions?, System.Collections.Generic.IEnumerable{string}?, System.Threading.CancellationToken)"/> 18/// overloads, whose factory callback receives a mutable <see cref="HybridCacheEntryContext"/>.
Microsoft.Extensions.Caching.Hybrid (7)
Internal\DefaultHybridCache.cs (2)
174Func<TState, HybridCacheEntryContext, CancellationToken, ValueTask<T>> factory, 310internal static HybridCacheEntryOptions CreateOptionsFromContext(HybridCacheEntryContext context)
Internal\DefaultHybridCache.StampedeStateT.cs (5)
27private Func<TState, HybridCacheEntryContext, CancellationToken, ValueTask<T>>? _factoryWithContext; // context-aware data factory 28private HybridCacheEntryContext? _context; // mutable view handed to a context-aware factory 69public void QueueUserWorkItem(in TState state, Func<TState, HybridCacheEntryContext, CancellationToken, ValueTask<T>> factory, HybridCacheEntryOptions? options) 105public Task ExecuteDirectAsync(in TState state, Func<TState, HybridCacheEntryContext, CancellationToken, ValueTask<T>> factory, HybridCacheEntryOptions? options) 673HybridCacheEntryContext context,
Microsoft.Extensions.Caching.Hybrid.Tests (3)
FactoryOptionsTests.cs (3)
175Func<HybridCacheEntryContext, CancellationToken, ValueTask<Guid>> factory = (entryContext, _) => 385var contextProps = typeof(HybridCacheEntryContext) 392var context = new HybridCacheEntryContext(null);