public SortedStream(ITraceMapper tracer, IExecutionContext executionContext, string sourceNodeName, IPushObservable <T> observable, SortDefinition <T, TKey> sortDefinition) : base(tracer, executionContext, sourceNodeName, observable) { if (sortDefinition == null) { throw new ArgumentOutOfRangeException(nameof(sortDefinition), "sorting criteria list cannot be empty"); } this.SortDefinition = sortDefinition; }
public Stream(ITraceMapper traceMapper, IExecutionContext executionContext, string sourceNodeName, IPushObservable <T> observable) { this.TraceMapper = traceMapper; this.SourceNodeName = sourceNodeName; this.ExecutionContext = executionContext; this.Observable = observable.TakeUntil(executionContext.StopProcessEvent); if (traceMapper != null) { this.TraceObservable = PushObservable.Merge <ITraceContent>( this.Observable.ExceptionsToObservable().Map(e => new UnhandledExceptionStreamTraceContent(e)), this.Observable.Count().Map(count => new CounterSummaryStreamTraceContent(count)), this.Observable.Map((e, i) => new RowProcessStreamTraceContent(i + 1, e)) ).Map(i => traceMapper.MapToTrace(i, executionContext.NextTraceSequence())); } }
public SingleStream(ITraceMapper tracer, IExecutionContext executionContext, string sourceNodeName, IPushObservable <T> observable) : base(tracer, executionContext, sourceNodeName, observable, new SortDefinition <T, T>(i => i)) { }
public override object GetMatchingStream(ITraceMapper tracer, IExecutionContext executionContext, string name, object observable) { return(new SingleStream <T>(tracer, executionContext, name, (IPushObservable <T>)observable)); }
public override object GetMatchingStream(ITraceMapper tracer, IExecutionContext executionContext, string name, object observable) { return(new KeyedStream <T, TKey>(tracer, executionContext, name, (IPushObservable <T>)observable, this.SortDefinition)); }