#nullable enable namespace Bts.DataStreamCore; using BCG; using Spark.Core.Collections; using System; using System.Collections.Generic; public static class BlueColumnValueCollection { public static BlueColumnValueCollection Create(IBlueRowCollection rows, int columnIndex, Func convert) => new(rows, columnIndex, convert); } public class BlueColumnValueCollection : IMutableCollectionFacade { readonly IBlueRowCollection rows; readonly int columnIndex; readonly Func convert; public BlueColumnValueCollection(IBlueRowCollection rows, int columnIndex, Func convert) { this.rows = rows; this.columnIndex = columnIndex; this.convert = convert; } public int Count => rows.Count; public IEnumerator GetEnumerator() { foreach (IBlueRow r in rows) { yield return convert(r[columnIndex]); } } }