OrleansJsonSerializer.Serialize 方法

定义

重载

Serialize(Object, Type)

将对象序列化为 JSON 字符串。

Serialize(Object, ISerializationContext, Type)

将对象序列化为二进制流

Serialize(Object, Type)

将对象序列化为 JSON 字符串。

public string Serialize(object item, Type expectedType);
member this.Serialize : obj * Type -> string
Public Function Serialize (item As Object, expectedType As Type) As String

参数

item
Object

要序列化的对象。

expectedType
Type

反序列化程序应预期的类型。

返回

适用于

Serialize(Object, ISerializationContext, Type)

Source:
OrleansJsonSerializer.cs

将对象序列化为二进制流

public void Serialize(object item, Orleans.Serialization.ISerializationContext context, Type expectedType);
abstract member Serialize : obj * Orleans.Serialization.ISerializationContext * Type -> unit
override this.Serialize : obj * Orleans.Serialization.ISerializationContext * Type -> unit
Public Sub Serialize (item As Object, context As ISerializationContext, expectedType As Type)

参数

item
Object

要序列化的对象

context
ISerializationContext

序列化上下文。

expectedType
Type

反序列化程序应预期的类型

实现

适用于