Share via


JsonDerivedTypeAttribute 建構函式

定義

多載

JsonDerivedTypeAttribute(Type)

使用指定的參數,初始化新的屬性。

JsonDerivedTypeAttribute(Type, Int32)

使用指定的參數,初始化新的屬性。

JsonDerivedTypeAttribute(Type, String)

使用指定的參數,初始化新的屬性。

JsonDerivedTypeAttribute(Type)

來源:
JsonDerivedTypeAttribute.cs
來源:
JsonDerivedTypeAttribute.cs
來源:
JsonDerivedTypeAttribute.cs

使用指定的參數,初始化新的屬性。

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

參數

derivedType
Type

在宣告型別的多型序列化中應該支援的衍生型別。

適用於

JsonDerivedTypeAttribute(Type, Int32)

來源:
JsonDerivedTypeAttribute.cs
來源:
JsonDerivedTypeAttribute.cs
來源:
JsonDerivedTypeAttribute.cs

使用指定的參數,初始化新的屬性。

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

參數

derivedType
Type

在宣告基底型別的多型序列化中應該支援的衍生型別。

typeDiscriminator
Int32

要用於子型別序列化的型別辨別器識別碼。

適用於

JsonDerivedTypeAttribute(Type, String)

來源:
JsonDerivedTypeAttribute.cs
來源:
JsonDerivedTypeAttribute.cs
來源:
JsonDerivedTypeAttribute.cs

使用指定的參數,初始化新的屬性。

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

參數

derivedType
Type

在宣告基底型別的多型序列化中應該支援的衍生型別。

typeDiscriminator
String

要用於子型別序列化的型別辨別器識別碼。

適用於