SerializationHostingExtensions.AddJsonSerializer 方法

定义

重载

AddJsonSerializer(ISerializerBuilder, Func<Type,Boolean>, JsonSerializerOptions)

添加了对使用 JsonSerializer进行值序列化和反序列化的支持。

AddJsonSerializer(ISerializerBuilder, Func<Type,Boolean>, Func<Type,Boolean>, Action<OptionsBuilder<JsonCodecOptions>>)

添加了对使用 JsonSerializer进行值序列化和反序列化的支持。

AddJsonSerializer(ISerializerBuilder, Func<Type,Boolean>, JsonSerializerOptions)

Source:
SerializationHostingExtensions.cs
Source:
SerializationHostingExtensions.cs
Source:
SerializationHostingExtensions.cs
Source:
SerializationHostingExtensions.cs

添加了对使用 JsonSerializer进行值序列化和反序列化的支持。

public static Orleans.Serialization.ISerializerBuilder AddJsonSerializer (this Orleans.Serialization.ISerializerBuilder serializerBuilder, Func<Type,bool> isSupported, System.Text.Json.JsonSerializerOptions jsonSerializerOptions = default);
static member AddJsonSerializer : Orleans.Serialization.ISerializerBuilder * Func<Type, bool> * System.Text.Json.JsonSerializerOptions -> Orleans.Serialization.ISerializerBuilder
<Extension()>
Public Function AddJsonSerializer (serializerBuilder As ISerializerBuilder, isSupported As Func(Of Type, Boolean), Optional jsonSerializerOptions As JsonSerializerOptions = Nothing) As ISerializerBuilder

参数

serializerBuilder
ISerializerBuilder

序列化程序生成器。

isSupported
Func<Type,Boolean>

一个委托,用于指示哪些类型应由此编解码器进行序列化和复制。

jsonSerializerOptions
JsonSerializerOptions

JSON 序列化程序选项。

适用于

AddJsonSerializer(ISerializerBuilder, Func<Type,Boolean>, Func<Type,Boolean>, Action<OptionsBuilder<JsonCodecOptions>>)

Source:
SerializationHostingExtensions.cs
Source:
SerializationHostingExtensions.cs
Source:
SerializationHostingExtensions.cs
Source:
SerializationHostingExtensions.cs

添加了对使用 JsonSerializer进行值序列化和反序列化的支持。

public static Orleans.Serialization.ISerializerBuilder AddJsonSerializer (this Orleans.Serialization.ISerializerBuilder serializerBuilder, Func<Type,bool> isSerializable = default, Func<Type,bool> isCopyable = default, Action<Microsoft.Extensions.Options.OptionsBuilder<Orleans.Serialization.JsonCodecOptions>> configureOptions = default);
static member AddJsonSerializer : Orleans.Serialization.ISerializerBuilder * Func<Type, bool> * Func<Type, bool> * Action<Microsoft.Extensions.Options.OptionsBuilder<Orleans.Serialization.JsonCodecOptions>> -> Orleans.Serialization.ISerializerBuilder
<Extension()>
Public Function AddJsonSerializer (serializerBuilder As ISerializerBuilder, Optional isSerializable As Func(Of Type, Boolean) = Nothing, Optional isCopyable As Func(Of Type, Boolean) = Nothing, Optional configureOptions As Action(Of OptionsBuilder(Of JsonCodecOptions)) = Nothing) As ISerializerBuilder

参数

serializerBuilder
ISerializerBuilder

序列化程序生成器。

isSerializable
Func<Type,Boolean>

一个委托,用于指示哪些类型应由此编解码器进行序列化。

isCopyable
Func<Type,Boolean>

用于指示此编解码器应复制哪些类型的委托。

configureOptions
Action<OptionsBuilder<JsonCodecOptions>>

用于配置 JSON 序列化程序选项的委托。

适用于