JsonStringEnumConverter.CreateConverter(Type, JsonSerializerOptions) 方法

定义

创建指定类型的转换器。Creates a converter for the specified type.

public:
 override System::Text::Json::Serialization::JsonConverter ^ CreateConverter(Type ^ typeToConvert, System::Text::Json::JsonSerializerOptions ^ options);
public override System.Text.Json.Serialization.JsonConverter CreateConverter (Type typeToConvert, System.Text.Json.JsonSerializerOptions options);
override this.CreateConverter : Type * System.Text.Json.JsonSerializerOptions -> System.Text.Json.Serialization.JsonConverter
Public Overrides Function CreateConverter (typeToConvert As Type, options As JsonSerializerOptions) As JsonConverter

参数

typeToConvert
Type

转换器处理的类型。The type handled by the converter.

options
JsonSerializerOptions

要使用的序列化选项。The serialization options to use.

返回

JsonConverter

TtypeToConvert 兼容的转换器。A converter for which T is compatible with typeToConvert.

适用于