HybridCacheBuilderExtensions.AddSerializerFactory Method
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.
AddSerializerFactory(IHybridCacheBuilder, IHybridCacheSerializerFactory) |
Add |
AddSerializerFactory<TImplementation>(IHybridCacheBuilder) |
Add a factory of type |
Add factory
as an additional serializer factory, which can provide serializers for multiple types.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::Caching::Hybrid::IHybridCacheBuilder ^ AddSerializerFactory(Microsoft::Extensions::Caching::Hybrid::IHybridCacheBuilder ^ builder, Microsoft::Extensions::Caching::Hybrid::IHybridCacheSerializerFactory ^ factory);
public static Microsoft.Extensions.Caching.Hybrid.IHybridCacheBuilder AddSerializerFactory(this Microsoft.Extensions.Caching.Hybrid.IHybridCacheBuilder builder, Microsoft.Extensions.Caching.Hybrid.IHybridCacheSerializerFactory factory);
static member AddSerializerFactory : Microsoft.Extensions.Caching.Hybrid.IHybridCacheBuilder * Microsoft.Extensions.Caching.Hybrid.IHybridCacheSerializerFactory -> Microsoft.Extensions.Caching.Hybrid.IHybridCacheBuilder
<Extension()>
Public Function AddSerializerFactory (builder As IHybridCacheBuilder, factory As IHybridCacheSerializerFactory) As IHybridCacheBuilder
Parameters
- builder
- IHybridCacheBuilder
- factory
- IHybridCacheSerializerFactory
Returns
The IHybridCacheBuilder instance.
Applies to
.NET 10 (package-provided) and other versions
Product | Versions |
---|---|
.NET | 8 (package-provided), 9 (package-provided), 10 (package-provided) |
.NET Standard | 2.0 (package-provided), 2.1 (package-provided) |
Add a factory of type TImplementation
as an additional serializer factory, which can provide serializers for multiple types.
public:
generic <typename TImplementation>
where TImplementation : class, Microsoft::Extensions::Caching::Hybrid::IHybridCacheSerializerFactory[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::Caching::Hybrid::IHybridCacheBuilder ^ AddSerializerFactory(Microsoft::Extensions::Caching::Hybrid::IHybridCacheBuilder ^ builder);
public static Microsoft.Extensions.Caching.Hybrid.IHybridCacheBuilder AddSerializerFactory<TImplementation>(this Microsoft.Extensions.Caching.Hybrid.IHybridCacheBuilder builder) where TImplementation : class, Microsoft.Extensions.Caching.Hybrid.IHybridCacheSerializerFactory;
static member AddSerializerFactory : Microsoft.Extensions.Caching.Hybrid.IHybridCacheBuilder -> Microsoft.Extensions.Caching.Hybrid.IHybridCacheBuilder (requires 'Implementation : null and 'Implementation :> Microsoft.Extensions.Caching.Hybrid.IHybridCacheSerializerFactory)
<Extension()>
Public Function AddSerializerFactory(Of TImplementation As {Class, IHybridCacheSerializerFactory}) (builder As IHybridCacheBuilder) As IHybridCacheBuilder
Type Parameters
- TImplementation
The type of the serializer factory.
Parameters
- builder
- IHybridCacheBuilder
Returns
The IHybridCacheBuilder instance.
Applies to
.NET 10 (package-provided) and other versions
Product | Versions |
---|---|
.NET | 8 (package-provided), 9 (package-provided), 10 (package-provided) |
.NET Standard | 2.0 (package-provided), 2.1 (package-provided) |
.NET feedback
.NET is an open source project. Select a link to provide feedback: