void Execute(ref uint counter, IRecordFormatter <ClrEnumRecord> formatter) { var src = @readonly(Records); var t = default(ClrEnumRecord); var count = src.Length; using var dst = Target.Writer(); dst.WriteLine(formatter.FormatHeader()); for (var i = 0u; i < count; i++) { ref readonly var record = ref skip(src, i);
public ExecToken Emit(ReadOnlySpan <BitMaskInfo> src, FS.FilePath dst) { var flow = Wf.EmittingTable <BitMaskInfo>(dst); var count = src.Length; using var writer = dst.Writer(); writer.WriteLine(Formatter.HeaderText); for (var i = 0u; i < count; i++) { writer.WriteLine(Formatter.Format(skip(src, i))); } return(Wf.EmittedTable <BitMaskInfo>(flow, count, dst)); }
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); }
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); }
public void Emit(Type src, FS.FilePath dst) { var flow = Wf.EmittingFile(dst); using var writer = dst.Writer(); var patterns = Sources(src); var view = patterns.View; var count = view.Length; for (var i = 0; i < count; i++) { writer.WriteLine(skip(view, i).Format()); } Wf.EmittedFile(flow, count); }