So they can retrieve services necessary to function (e.g., add themselves to the master IWorkScheduler so doWork gets called, etc.)
24 lines
720 B
C#
24 lines
720 B
C#
using System;
|
|
using System.Collections;
|
|
|
|
namespace BCG
|
|
{
|
|
/// <summary>
|
|
/// Provides a stream that with distinct rows with respect to the columns
|
|
/// the user specifies in the argument
|
|
/// </summary>
|
|
[DataStreamUserRespresentation ("distinct")]
|
|
public class DistinctRowStream : ViewStream
|
|
{
|
|
public DistinctRowStream (ViewStream stream, params string[] cols)
|
|
{
|
|
ArrayList groupByCols = new ArrayList ();
|
|
foreach (string col in cols)
|
|
foreach (string c in col.Split (' '))
|
|
groupByCols.Add (c);
|
|
mySetRealSource (AttachStream(new GroupByStream (stream,
|
|
new DistinctRowEvaluator (groupByCols.ToArray (typeof(string)) as string[]), false)));
|
|
}
|
|
}
|
|
}
|