using bts; using System; using System.Collections; namespace BCG { /// /// Provides a stream that with distinct rows with respect to the columns /// the user specifies in the argument /// [DataStreamUserRespresentation("distinct")] public class DistinctRowStream : ViewStream { public DistinctRowStream(ViewStream stream, params string[] cols) { var g_by_eval = new DistinctRowEvaluator(cols); ViewStream r = new GroupByStream(stream, g_by_eval); var proj_exp = String.Empty; foreach (var c in cols) proj_exp += $"{c} "; proj_exp = proj_exp.Trim(); r = new NewProjectStream(r, proj_exp); mySetRealSource(r); } } }