Exemplo n.º 1
0
 public WorkloadStatisticsDecoratorSource(Guid groupingGuid, ZContext ctx, ISourceFunctor <TOut> decoratedSource, int boundedCapacity, Func <int> outMsgCnt, CancellationToken ct)
     : base(groupingGuid, ctx, DataflowNetworkConstituent.Source, boundedCapacity, ct)
 {
     m_DecoratedSource = decoratedSource;
     m_OutMsgFunc      = outMsgCnt;
     m_nms             = 0;
 }
 public static ISourceFunctor <TIn> WithStatistics <TIn>(this ISourceFunctor <TIn> decoratedSource, ILogAgent logAgent)
 {
     return(new StatisticsLogDecoratorSource <TIn>(decoratedSource, logAgent));
 }
Exemplo n.º 3
0
 public static ISourceFunctor <TOut> WithWorkloadStatistiscs <TOut>(this ISourceFunctor <TOut> decoratedSource, int boundetCapacity, Func <int> outMsgCnt, ZContext ctx, Guid groupguid, CancellationToken ct)
 {
     return(new WorkloadStatisticsDecoratorSource <TOut>(groupguid, ctx, decoratedSource, boundetCapacity, outMsgCnt, ct));//(decoratedSource, boundetCapacity, outMsgCnt);
 }
Exemplo n.º 4
0
 public static ISourceFunctor <TOut> SkipEmpty <TOut>(this ISourceFunctor <TOut> decoratedSource)
 {
     return(new SkipEmptyDecoratorSource <TOut>(decoratedSource));
 }
 public StatisticsLogDecoratorSource(ISourceFunctor <TOut> decoreatedFunctor, ILogAgent logAgent)
     : base(logAgent, decoreatedFunctor.Title, DataflowNetworkConstituent.Source)
 {
     m_DecoratedFunctor = decoreatedFunctor;
 }
Exemplo n.º 6
0
 public LogDecoratorSource(ISourceFunctor <TOut> decoratedSource, ILogAgent logAgent)
 {
     m_DecoratedSource = decoratedSource;
     m_LogAgent        = logAgent;
 }
Exemplo n.º 7
0
 public SkipEmptyDecoratorSource(ISourceFunctor <TOut> decoratedSource)
 {
     m_DecoratedSource = decoratedSource;
 }
 public static ISourceFunctor <TOut> WithLogging <TOut>(this ISourceFunctor <TOut> decoratedSource, ILogAgent logAgent)
 {
     return(new LogDecoratorSource <TOut>(decoratedSource, logAgent));
 }
Exemplo n.º 9
0
 public static Func <IEnumerable <IDataflowMessage <TOut> > > AsFunction <TOut>(this ISourceFunctor <TOut> source)
 {
     return(source.Pull);
 }