ערוך

שתף באמצעות


JsonMetadataServices.GetEnumConverter<T>(JsonSerializerOptions) Method

Definition

Creates a JsonConverter<T> instance that converts T values.

public:
generic <typename T>
 where T : value class static System::Text::Json::Serialization::JsonConverter<T> ^ GetEnumConverter(System::Text::Json::JsonSerializerOptions ^ options);
public static System.Text.Json.Serialization.JsonConverter<T> GetEnumConverter<T> (System.Text.Json.JsonSerializerOptions options) where T : struct;
static member GetEnumConverter : System.Text.Json.JsonSerializerOptions -> System.Text.Json.Serialization.JsonConverter<'T (requires 'T : struct)> (requires 'T : struct)
Public Shared Function GetEnumConverter(Of T As Structure) (options As JsonSerializerOptions) As JsonConverter(Of T)

Type Parameters

T

The generic definition for the enum type.

Parameters

options
JsonSerializerOptions

The JsonSerializerOptions to use for serialization and deserialization.

Returns

A JsonConverter<T> instance that converts T values.

Remarks

This API is for use by the output of the System.Text.Json source generator and should not be called directly.

Applies to