void GenerateEnum(ProcessedType type)
        {
            Type t               = type.Type;
            var  managed_name    = type.ObjCName;
            var  underlying_type = t.GetEnumUnderlyingType();
            var  base_type       = NameGenerator.GetTypeName(underlying_type);

            // it's nicer to expose flags as unsigned integers - but .NET defaults to `int`
            bool flags = t.HasCustomAttribute("System", "FlagsAttribute");

            if (flags)
            {
                switch (Type.GetTypeCode(underlying_type))
                {
                case TypeCode.SByte:
                case TypeCode.Int16:
                case TypeCode.Int32:
                case TypeCode.Int64:
                    base_type = "unsigned " + base_type;
                    break;
                }
            }

            var macro = flags ? "NS_OPTIONS" : "NS_ENUM";

            headers.WriteLine($"/** Enumeration {managed_name}");
            headers.WriteLine($" *  Corresponding .NET Qualified Name: `{t.AssemblyQualifiedName}`");
            headers.WriteLine(" */");
            headers.WriteLine($"typedef {macro}({base_type}, {managed_name}) {{");
            headers.Indent++;
            foreach (var name in t.GetEnumNames())
            {
                var value = t.GetField(name).GetRawConstantValue();
                headers.Write($"{managed_name}{name} = ");
                if (flags)
                {
                    headers.Write($"0x{value:x}");
                }
                else
                {
                    headers.Write(value);
                }
                headers.WriteLine(',');
            }
            headers.Indent--;
            headers.WriteLine("};");
            headers.WriteLine();
        }
        void GenerateEnum(Type t)
        {
            var managed_name    = GetObjCName(t);
            var underlying_type = t.GetEnumUnderlyingType();
            var base_type       = GetTypeName(underlying_type);

            // it's nicer to expose flags as unsigned integers - but .NET defaults to `int`
            bool flags = t.HasCustomAttribute("System", "FlagsAttribute");

            if (flags)
            {
                switch (Type.GetTypeCode(underlying_type))
                {
                case TypeCode.SByte:
                case TypeCode.Int16:
                case TypeCode.Int32:
                case TypeCode.Int64:
                    base_type = "unsigned " + base_type;
                    break;
                }
            }

            var macro = flags ? "NS_OPTIONS" : "NS_ENUM";

            headers.WriteLine($"typedef {macro}({base_type}, {managed_name}) {{");
            foreach (var name in t.GetEnumNames())
            {
                var value = t.GetField(name).GetRawConstantValue();
                headers.Write($"\t{managed_name}{name} = ");
                if (flags)
                {
                    headers.Write($"0x{value:x}");
                }
                else
                {
                    headers.Write(value);
                }
                headers.WriteLine(',');
            }
            headers.WriteLine("};");
            headers.WriteLine();
        }