public WorkloadStatisticsDecoratorTarget(Guid groupGuid, ZContext ctx, ITargetFunctor <TIn> decoratedTarget, int boundedCapacity, Func <int> incMsgCnt, CancellationToken ct)
     : base(groupGuid, ctx, DataflowNetworkConstituent.Target, boundedCapacity, ct)
 {
     m_DecoratedTarget = decoratedTarget;
     m_InMsgFunc       = incMsgCnt;
     m_nms             = 0;
 }
 public static ITargetFunctor <TIn> WithStatistics <TIn>(this ITargetFunctor <TIn> decoratedTarget, ILogAgent logAgent)
 {
     return(new StatisticsLogDecoratorTarget <TIn>(decoratedTarget, logAgent));
 }
예제 #3
0
 public static ITargetFunctor <TIn> WithWorkloadStatistics <TIn>(this ITargetFunctor <TIn> decoratedTarget, int boundedCapacity, Func <int> incMsgCnt, ZContext ctx, Guid groupguid, CancellationToken ct)
 {
     return(new WorkloadStatisticsDecoratorTarget <TIn>(groupguid, ctx, decoratedTarget, boundedCapacity, incMsgCnt, ct));
 }
 public StatisticsLogDecoratorTarget(ITargetFunctor <TIn> decoratedTarget, ILogAgent logAgent)
     : base(logAgent, decoratedTarget.Title, DataflowNetworkConstituent.Target)
 {
     m_DecoratedTarget = decoratedTarget;
 }
 public LogDecoratorTarget(ITargetFunctor <TIn> decoratedTarget, ILogAgent logAgent)
 {
     m_DecoratedTarget = decoratedTarget;
     m_LogAgent        = logAgent;
 }
예제 #6
0
 public static Action <IDataflowMessage <TIn> > AsFunction <TIn>(this ITargetFunctor <TIn> target)
 {
     return(target.Push);
 }