SerializationInfo 构造函数

定义

初始化 SerializationInfo 类的新实例。

重载

SerializationInfo(Type, IFormatterConverter)
已过时.

创建 SerializationInfo 类的新实例。

SerializationInfo(Type, IFormatterConverter, Boolean)
已过时.

初始化 SerializationInfo 类的新实例。

SerializationInfo(Type, IFormatterConverter)

Source:
SerializationInfo.cs
Source:
SerializationInfo.cs
Source:
SerializationInfo.cs

注意

Formatter-based serialization is obsolete and should not be used.

重要

此 API 不符合 CLS。

创建 SerializationInfo 类的新实例。

public:
 SerializationInfo(Type ^ type, System::Runtime::Serialization::IFormatterConverter ^ converter);
[System.CLSCompliant(false)]
public SerializationInfo (Type type, System.Runtime.Serialization.IFormatterConverter converter);
[System.CLSCompliant(false)]
[System.Obsolete("Formatter-based serialization is obsolete and should not be used.", DiagnosticId="SYSLIB0050", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public SerializationInfo (Type type, System.Runtime.Serialization.IFormatterConverter converter);
[<System.CLSCompliant(false)>]
new System.Runtime.Serialization.SerializationInfo : Type * System.Runtime.Serialization.IFormatterConverter -> System.Runtime.Serialization.SerializationInfo
[<System.CLSCompliant(false)>]
[<System.Obsolete("Formatter-based serialization is obsolete and should not be used.", DiagnosticId="SYSLIB0050", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Runtime.Serialization.SerializationInfo : Type * System.Runtime.Serialization.IFormatterConverter -> System.Runtime.Serialization.SerializationInfo
Public Sub New (type As Type, converter As IFormatterConverter)

参数

type
Type

要序列化的对象的 Type

converter
IFormatterConverter

在反序列化过程中使用的 IFormatterConverter

属性

例外

typeconverternull

注解

作为 参数传递的 converter 会将IFormatterConverter数据从其内部表示形式转换为用户请求的形式。 内数据 SerializationInfo 的内部表示形式取决于创建数据的格式化程序。

适用于

SerializationInfo(Type, IFormatterConverter, Boolean)

Source:
SerializationInfo.cs
Source:
SerializationInfo.cs
Source:
SerializationInfo.cs

注意

Formatter-based serialization is obsolete and should not be used.

重要

此 API 不符合 CLS。

初始化 SerializationInfo 类的新实例。

public:
 SerializationInfo(Type ^ type, System::Runtime::Serialization::IFormatterConverter ^ converter, bool requireSameTokenInPartialTrust);
[System.CLSCompliant(false)]
public SerializationInfo (Type type, System.Runtime.Serialization.IFormatterConverter converter, bool requireSameTokenInPartialTrust);
[System.CLSCompliant(false)]
[System.Obsolete("Formatter-based serialization is obsolete and should not be used.", DiagnosticId="SYSLIB0050", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public SerializationInfo (Type type, System.Runtime.Serialization.IFormatterConverter converter, bool requireSameTokenInPartialTrust);
[<System.CLSCompliant(false)>]
new System.Runtime.Serialization.SerializationInfo : Type * System.Runtime.Serialization.IFormatterConverter * bool -> System.Runtime.Serialization.SerializationInfo
[<System.CLSCompliant(false)>]
[<System.Obsolete("Formatter-based serialization is obsolete and should not be used.", DiagnosticId="SYSLIB0050", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Runtime.Serialization.SerializationInfo : Type * System.Runtime.Serialization.IFormatterConverter * bool -> System.Runtime.Serialization.SerializationInfo
Public Sub New (type As Type, converter As IFormatterConverter, requireSameTokenInPartialTrust As Boolean)

参数

type
Type

要序列化的对象的 Type

converter
IFormatterConverter

在反序列化过程中使用的 IFormatterConverter

requireSameTokenInPartialTrust
Boolean

指示对象是否需要部分信任的同一标记。

属性

适用于