---
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.Runtime.InteropServices;

namespace Demo
{
    [StructLayout(LayoutKind.Sequential)]
    public readonly record struct Flag(
        Status Status,
        uint Count
    )
    {
        internal static Flag Decode(WireReader reader) =>
            new Flag(
                StatusWire.Decode(reader),
                reader.ReadU32()
            );

        internal int WireEncodedSize() =>
            4 +
            4;

        internal void WireEncodeTo(WireWriter wire)
        {
            this.Status.WireEncodeTo(wire);
            wire.WriteU32(this.Count);
        }
    }
}
