23 references to EnumConverterOptions
System.Text.Json (23)
System\Text\Json\Serialization\Converters\Value\EnumConverter.cs (9)
25private readonly EnumConverterOptions _converterOptions; // Do not rename (legacy schema generation) 56public EnumConverter(EnumConverterOptions converterOptions, JsonNamingPolicy? namingPolicy, JsonSerializerOptions options) 106case JsonTokenType.String when (_converterOptions & EnumConverterOptions.AllowStrings) != 0: 113case JsonTokenType.Number when (_converterOptions & EnumConverterOptions.AllowNumbers) != 0: 134EnumConverterOptions converterOptions = _converterOptions; 135if ((converterOptions & EnumConverterOptions.AllowStrings) != 0) 166if ((converterOptions & EnumConverterOptions.AllowNumbers) == 0) 267if ((_converterOptions & EnumConverterOptions.AllowNumbers) != 0) 499if ((_converterOptions & EnumConverterOptions.AllowStrings) != 0)
System\Text\Json\Serialization\Converters\Value\EnumConverterFactory.cs (4)
25return Create(type, EnumConverterOptions.AllowNumbers, namingPolicy: null, options); 31public static JsonConverter Create(Type enumType, EnumConverterOptions converterOptions, JsonNamingPolicy? namingPolicy, JsonSerializerOptions options) 41parameterTypes: [typeof(EnumConverterOptions), typeof(JsonNamingPolicy), typeof(JsonSerializerOptions)], 56public static JsonConverter<T> Create<T>(EnumConverterOptions converterOptions, JsonSerializerOptions options, JsonNamingPolicy? namingPolicy = null)
System\Text\Json\Serialization\JsonNumberEnumConverter.cs (1)
36return EnumConverterFactory.Helpers.Create<TEnum>(EnumConverterOptions.AllowNumbers, options);
System\Text\Json\Serialization\JsonStringEnumConverter.cs (8)
20private readonly EnumConverterOptions _converterOptions; 45? EnumConverterOptions.AllowNumbers | EnumConverterOptions.AllowStrings 46: EnumConverterOptions.AllowStrings; 76private readonly EnumConverterOptions _converterOptions; 101? EnumConverterOptions.AllowNumbers | EnumConverterOptions.AllowStrings 102: EnumConverterOptions.AllowStrings;
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Converters.cs (1)
290return EnumConverterFactory.Helpers.Create<T>(EnumConverterOptions.AllowNumbers, options);