SerializationHostingExtensions.AddJsonSerializer 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
AddJsonSerializer(ISerializerBuilder, Func<Type,Boolean>, JsonSerializerOptions)
添加了对使用 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
序列化程序生成器。
- jsonSerializerOptions
- JsonSerializerOptions
JSON 序列化程序选项。
适用于
AddJsonSerializer(ISerializerBuilder, Func<Type,Boolean>, Func<Type,Boolean>, Action<OptionsBuilder<JsonCodecOptions>>)
添加了对使用 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
序列化程序生成器。
- configureOptions
- Action<OptionsBuilder<JsonCodecOptions>>
用于配置 JSON 序列化程序选项的委托。