19 references to StringEnum
Microsoft.Extensions.AI.Abstractions.Tests (19)
test\Shared\JsonSchemaExporter\TestTypes.cs (19)
109yield return new TestData<StringEnum>(StringEnum.A, """{"enum": ["A","B","C"]}""");
119yield return new TestData<StringEnum?>(StringEnum.A, """{"enum":["A","B","C",null]}""");
199Value: new(1, "two", true, 3.14, StringEnum.A),
406StringEnum = StringEnum.B,
409StringEnumUsingIntConverter = StringEnum.A,
410NullableStringEnumUsingIntConverter = StringEnum.B
416StringEnum = StringEnum.A,
419StringEnumUsingIntConverter = (StringEnum)int.MaxValue,
852[JsonConverter(typeof(JsonStringEnumConverter<StringEnum>))]
872[property: Description("required integer")] int X1, string X2, bool X3, double X4, [Description("required string enum")] StringEnum X5,
873[property: Description("optional integer")] int Y1 = 42, string Y2 = "str", bool Y3 = true, double Y4 = 0, [Description("optional string enum")] StringEnum Y5 = StringEnum.A);
978public StringEnum StringEnum { get; init; }
986[JsonConverter(typeof(JsonNumberEnumConverter<StringEnum>))]
987public StringEnum StringEnumUsingIntConverter { get; set; }
989[JsonConverter(typeof(JsonNumberEnumConverter<StringEnum>))]
990public StringEnum? NullableStringEnumUsingIntConverter { get; set; }