共用方式為


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)

來源:
SerializationHostingExtensions.cs
來源:
SerializationHostingExtensions.cs
來源:
SerializationHostingExtensions.cs
來源:
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>>)

來源:
SerializationHostingExtensions.cs
來源:
SerializationHostingExtensions.cs
來源:
SerializationHostingExtensions.cs
來源:
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 序列化程式選項的委派。

適用於