Share via


JsonDerivedType 建構函式

定義

多載

JsonDerivedType(Type)

初始化 類別的新實例,這個實例 JsonDerivedType 表示不支援的衍生型別,而不需要型別鑒別子。

JsonDerivedType(Type, Int32)

初始化 類別的新實例,這個實例 JsonDerivedType 表示具有整數型別鑒別子的支援衍生型別。

JsonDerivedType(Type, String)

初始化 類別的新實例,這個實例 JsonDerivedType 表示具有字串類型鑒別子的受支援衍生型別。

JsonDerivedType(Type)

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

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

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

要與衍生型別相關聯的型別辨別子。

適用於