Edit

Bagikan melalui


JsonDerivedType Constructors

Definition

Overloads

JsonDerivedType(Type)

Initializes a new instance of the JsonDerivedType class that represents a supported derived type without a type discriminator.

JsonDerivedType(Type, Int32)

Initializes a new instance of the JsonDerivedType class that represents a supported derived type with an integer type discriminator.

JsonDerivedType(Type, String)

Initializes a new instance of the JsonDerivedType class that represents a supported derived type with a string type discriminator.

JsonDerivedType(Type)

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

Initializes a new instance of the JsonDerivedType class that represents a supported derived type without a type discriminator.

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)

Parameters

derivedType
Type

The derived type to be supported by the polymorphic type metadata.

Applies to

JsonDerivedType(Type, Int32)

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

Initializes a new instance of the JsonDerivedType class that represents a supported derived type with an integer type discriminator.

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)

Parameters

derivedType
Type

The derived type to be supported by the polymorphic type metadata.

typeDiscriminator
Int32

The type discriminator to be associated with the derived type.

Applies to

JsonDerivedType(Type, String)

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

Initializes a new instance of the JsonDerivedType class that represents a supported derived type with a string type discriminator.

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)

Parameters

derivedType
Type

The derived type to be supported by the polymorphic type metadata.

typeDiscriminator
String

The type discriminator to be associated with the derived type.

Applies to