HybridCacheBuilderExtensions.AddSerializer Method
Definition
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.
Overloads
AddSerializer<T,TImplementation>(IHybridCacheBuilder) |
Serialize values of type |
AddSerializer<T>(IHybridCacheBuilder, IHybridCacheSerializer<T>) |
Serialize values of type |
AddSerializer<T,TImplementation>(IHybridCacheBuilder)
Serialize values of type T
with the serializer of type TImplementation
.
public:
generic <typename T, typename TImplementation>
where TImplementation : class, Microsoft::Extensions::Caching::Hybrid::IHybridCacheSerializer<T>[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::Caching::Hybrid::IHybridCacheBuilder ^ AddSerializer(Microsoft::Extensions::Caching::Hybrid::IHybridCacheBuilder ^ builder);
public static Microsoft.Extensions.Caching.Hybrid.IHybridCacheBuilder AddSerializer<T,TImplementation> (this Microsoft.Extensions.Caching.Hybrid.IHybridCacheBuilder builder) where TImplementation : class, Microsoft.Extensions.Caching.Hybrid.IHybridCacheSerializer<T>;
static member AddSerializer : Microsoft.Extensions.Caching.Hybrid.IHybridCacheBuilder -> Microsoft.Extensions.Caching.Hybrid.IHybridCacheBuilder (requires 'Implementation : null and 'Implementation :> Microsoft.Extensions.Caching.Hybrid.IHybridCacheSerializer<'T>)
<Extension()>
Public Function AddSerializer(Of T, TImplementation) (builder As IHybridCacheBuilder) As IHybridCacheBuilder
Type Parameters
- T
The type to be serialized.
- TImplementation
The serializer to use for this type.
Parameters
- builder
- IHybridCacheBuilder
Returns
The IHybridCacheBuilder instance.
Applies to
AddSerializer<T>(IHybridCacheBuilder, IHybridCacheSerializer<T>)
Serialize values of type T
with the specified serializer from serializer
.
public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::Caching::Hybrid::IHybridCacheBuilder ^ AddSerializer(Microsoft::Extensions::Caching::Hybrid::IHybridCacheBuilder ^ builder, Microsoft::Extensions::Caching::Hybrid::IHybridCacheSerializer<T> ^ serializer);
public static Microsoft.Extensions.Caching.Hybrid.IHybridCacheBuilder AddSerializer<T> (this Microsoft.Extensions.Caching.Hybrid.IHybridCacheBuilder builder, Microsoft.Extensions.Caching.Hybrid.IHybridCacheSerializer<T> serializer);
static member AddSerializer : Microsoft.Extensions.Caching.Hybrid.IHybridCacheBuilder * Microsoft.Extensions.Caching.Hybrid.IHybridCacheSerializer<'T> -> Microsoft.Extensions.Caching.Hybrid.IHybridCacheBuilder
<Extension()>
Public Function AddSerializer(Of T) (builder As IHybridCacheBuilder, serializer As IHybridCacheSerializer(Of T)) As IHybridCacheBuilder
Type Parameters
- T
The type to be serialized.
Parameters
- builder
- IHybridCacheBuilder
- serializer
- IHybridCacheSerializer<T>
Returns
The IHybridCacheBuilder instance.
Applies to
.NET