INNER CODE UNIT · C#

result

axmolengine/axmol · tools/bindings-generator/src/BatchGeneration.cs:317

        var result = value.EnumerateArray().Select(x =>
        {
            if (x.ValueKind != JsonValueKind.String)
                throw new InvalidDataException($"'{name}' must contain only strings.");
            return x.GetString()!;
        }).Where(x => x.Length > 0).ToArray();
        if (required && result.Length == 0)
            throw new InvalidDataException($"'{name}' must not be empty.");
        return result;
    }

    private static IReadOnlyList<BindingSkipRule> ReadSkipRules(JsonElement root)
    {
        if (!root.TryGetProperty("skip", out var value))
            return Array.Empty<BindingSkipRule>();
        if (value.ValueKind != JsonValueKind.Array)
            throw new InvalidDataException("'skip' must be an array.");
        return value.EnumerateArray().Select(entry =>

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…