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 序列化程式選項的委派。