示例#1
0
        static EnumDataset <E, T> emit <E, T>(ReadOnlySpan <EnumLiteralInfo <E, T> > src, FS.FilePath dst)
            where E : unmanaged, Enum
            where T : unmanaged
        {
            using var writer = dst.Writer();
            writer.WriteLine(header <F>());

            var dataset = EnumDatasets.create <E, T>();

            for (var i = 0; i < src.Length; i++)
            {
                writer.WriteLine(EnumDatasets.format(src[i]));
            }
            return(dataset);
        }
示例#2
0
        static EnumDataset <E, T> EmitDataset <E, T>(FS.FilePath dst)
            where E : unmanaged, Enum
            where T : unmanaged
        {
            using var writer = dst.Writer();
            writer.WriteLine(header <F>());

            var dataset = EnumDatasets.create <E, T>();

            for (var i = 0; i < dataset.EntryCount; i++)
            {
                writer.WriteLine(EnumDatasets.format(dataset[i]));
            }
            return(dataset);
        }