alef-backend-csharp 0.16.2

C# (P/Invoke) backend for alef
Documentation
// This file is auto-generated by alef. DO NOT EDIT.
#nullable enable

using System;
using System.Text.Json;
using System.Text.Json.Serialization;

namespace {{ namespace }};
{% if doc -%}

/// <summary>
{%- for line in doc_lines %}
/// {{ line }}
{%- endfor %}
/// </summary>
{% endif -%}
{% if needs_custom_converter -%}

[JsonConverter(typeof({{ enum_pascal }}JsonConverter))]
{% else -%}

[JsonConverter(typeof(JsonStringEnumConverter))]
{% endif -%}

public enum {{ enum_pascal }}
{
{%- for variant in variants %}
{% if variant.doc -%}
    /// <summary>
{%- for line in variant.doc_lines %}
    /// {{ line }}
{%- endfor %}
    /// </summary>
{% endif -%}
    [JsonPropertyName("{{ variant.json_name }}")]
    {{ variant.pascal_name }},
{%- endfor %}
}