---
source: boltffi_bindgen/src/render/csharp/templates.rs
expression: template.render().unwrap()
---
// <auto-generated>
// This file was generated by BoltFFI. Do not edit.
// </auto-generated>
#nullable enable

using System;
using System.Text;

namespace Demo
{
    public readonly record struct Person(
        string Name,
        uint Age
    )
    {
        internal static Person Decode(WireReader reader) =>
            new Person(
                reader.ReadString(),
                reader.ReadU32()
            );

        internal int WireEncodedSize() =>
            (4 + Encoding.UTF8.GetByteCount(this.Name)) +
            4;

        internal void WireEncodeTo(WireWriter wire)
        {
            wire.WriteString(this.Name);
            wire.WriteU32(this.Age);
        }
    }
}
