Add IndexOf and AttemptCounter properties to WSRequest and Description classes; implement getValue function in recipes-and-patterns.js

This commit is contained in:
2025-10-13 17:51:36 -07:00
parent 5c2a3c97e9
commit ddf12e5ec0
16 changed files with 757 additions and 579 deletions

View File

@ -1060,12 +1060,11 @@ public class ProcessData : IProcessData
{
List<Description> results = new();
Description? description;
JsonSerializerOptions jsonSerializerOptions = new() { NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString };
foreach (JsonElement jsonElement in jsonElements)
{
if (jsonElement.ValueKind != JsonValueKind.Object)
throw new Exception();
description = JsonSerializer.Deserialize<Description>(jsonElement.ToString(), jsonSerializerOptions);
description = JsonSerializer.Deserialize(jsonElement.ToString(), DescriptionSourceGenerationContext.Default.Description);
if (description is null)
continue;
results.Add(description);