alef-codegen 0.17.0

Shared codegen utilities for the alef polyglot binding generator
Documentation
// This file is auto-generated by alef. DO NOT EDIT.
#nullable enable

using System;

namespace {{ namespace }};

{% if doc %}
/// <summary>
{% for line in doc_lines %}
/// {{ line }}
{% endfor %}
/// </summary>
{% endif %}
public class {{ base_name }} : {{ base_parent }}
{
{% if has_methods %}
{% for m in methods %}
{% if m.doc %}    /// <summary>{{ m.doc }}</summary>
{% endif %}
    public {{ m.cs_type }} {{ m.prop_name }} { get; }
{% endfor %}

    public {{ base_name }}(string message) : base(message)
    {
{% for m in methods %}
        {{ m.prop_name }} = {{ m.default_value }};
{% endfor %}
    }

    public {{ base_name }}(string message, Exception innerException) : base(message, innerException)
    {
{% for m in methods %}
        {{ m.prop_name }} = {{ m.default_value }};
{% endfor %}
    }

    public {{ base_name }}(string message{% for m in methods %}, {{ m.cs_type }} {{ m.param_name }}{% endfor %}) : base(message)
    {
{% for m in methods %}
        {{ m.prop_name }} = {{ m.param_name }};
{% endfor %}
    }

    public {{ base_name }}(string message, Exception innerException{% for m in methods %}, {{ m.cs_type }} {{ m.param_name }}{% endfor %}) : base(message, innerException)
    {
{% for m in methods %}
        {{ m.prop_name }} = {{ m.param_name }};
{% endfor %}
    }
{% else %}
    public {{ base_name }}(string message) : base(message) { }

    public {{ base_name }}(string message, Exception innerException) : base(message, innerException) { }
{% endif %}
}