共用方式為


JsonStringEnumConverter.CreateConverter(Type, JsonSerializerOptions) 方法

定義

建立指定類型的轉換器。

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);
public override sealed 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
Public Overrides NotOverridable Function CreateConverter (typeToConvert As Type, options As JsonSerializerOptions) As JsonConverter

參數

typeToConvert
Type

轉換器處理的類型。

options
JsonSerializerOptions

要使用的序列化選項。

傳回

JsonConverter

TtypeToConvert 相容的轉換器。

適用於