2 implementations of IHybridCacheSerializerFactory
Microsoft.Extensions.Caching.Hybrid (1)
Internal\DefaultJsonSerializerFactory.cs (1)
10internal sealed class DefaultJsonSerializerFactory : IHybridCacheSerializerFactory
Microsoft.Extensions.Caching.Hybrid.Tests (1)
ServiceConstructionTests.cs (1)
247private class CustomFactory : IHybridCacheSerializerFactory
9 references to IHybridCacheSerializerFactory
Microsoft.Extensions.Caching.Hybrid (8)
HybridCacheBuilderExtensions.cs (4)
44public static IHybridCacheBuilder AddSerializerFactory(this IHybridCacheBuilder builder, IHybridCacheSerializerFactory factory) 46_ = Throw.IfNull(builder).Services.AddSingleton<IHybridCacheSerializerFactory>(factory); 57where TImplementation : class, IHybridCacheSerializerFactory 59_ = Throw.IfNull(builder).Services.AddSingleton<IHybridCacheSerializerFactory, TImplementation>();
HybridCacheServiceExtensions.cs (1)
38services.TryAddSingleton<IHybridCacheSerializerFactory, DefaultJsonSerializerFactory>();
Internal\DefaultHybridCache.cs (2)
30private readonly IHybridCacheSerializerFactory[] _serializerFactories; 88var factories = services.GetServices<IHybridCacheSerializerFactory>().ToArray();
Internal\DefaultHybridCache.Serialization.cs (1)
34foreach (var factory in @this._serializerFactories)
Microsoft.Extensions.Caching.Hybrid.Tests (1)
ServiceConstructionTests.cs (1)
249bool IHybridCacheSerializerFactory.TryCreateSerializer<T>(out IHybridCacheSerializer<T>? serializer)