Share via


JsonDerivedType 构造函数

定义

重载

JsonDerivedType(Type)

初始化 类的新实例, JsonDerivedType 该实例表示没有类型鉴别器支持的派生类型。

JsonDerivedType(Type, Int32)

使用整数类型鉴别器初始化 表示支持的派生类型的 类的新实例 JsonDerivedType

JsonDerivedType(Type, String)

使用字符串类型 JsonDerivedType 鉴别器初始化 表示支持的派生类型的 类的新实例。

JsonDerivedType(Type)

Source:
JsonDerivedType.cs
Source:
JsonDerivedType.cs
Source:
JsonDerivedType.cs

初始化 类的新实例, JsonDerivedType 该实例表示没有类型鉴别器支持的派生类型。

public:
 JsonDerivedType(Type ^ derivedType);
public JsonDerivedType (Type derivedType);
new System.Text.Json.Serialization.Metadata.JsonDerivedType : Type -> System.Text.Json.Serialization.Metadata.JsonDerivedType
Public Sub New (derivedType As Type)

参数

derivedType
Type

多态类型元数据要支持的派生类型。

适用于

JsonDerivedType(Type, Int32)

Source:
JsonDerivedType.cs
Source:
JsonDerivedType.cs
Source:
JsonDerivedType.cs

使用整数类型鉴别器初始化 表示支持的派生类型的 类的新实例 JsonDerivedType

public:
 JsonDerivedType(Type ^ derivedType, int typeDiscriminator);
public JsonDerivedType (Type derivedType, int typeDiscriminator);
new System.Text.Json.Serialization.Metadata.JsonDerivedType : Type * int -> System.Text.Json.Serialization.Metadata.JsonDerivedType
Public Sub New (derivedType As Type, typeDiscriminator As Integer)

参数

derivedType
Type

多态类型元数据要支持的派生类型。

typeDiscriminator
Int32

要与派生类型关联的类型鉴别器。

适用于

JsonDerivedType(Type, String)

Source:
JsonDerivedType.cs
Source:
JsonDerivedType.cs
Source:
JsonDerivedType.cs

使用字符串类型 JsonDerivedType 鉴别器初始化 表示支持的派生类型的 类的新实例。

public:
 JsonDerivedType(Type ^ derivedType, System::String ^ typeDiscriminator);
public JsonDerivedType (Type derivedType, string typeDiscriminator);
new System.Text.Json.Serialization.Metadata.JsonDerivedType : Type * string -> System.Text.Json.Serialization.Metadata.JsonDerivedType
Public Sub New (derivedType As Type, typeDiscriminator As String)

参数

derivedType
Type

多态类型元数据要支持的派生类型。

typeDiscriminator
String

要与派生类型关联的类型鉴别器。

适用于