Exemple #1
0
 public static SubFlow <IEnumerable <RawPacket>, TMat, TClosed> GroupedByCountAndRawCaptureSizeWithin <TMat, TClosed>(
     this SubFlow <RawPacket, TMat, TClosed> flow,
     Int32 count,
     Int32 rawCapturesSizeLimit,
     TimeSpan timeout) =>
 (SubFlow <IEnumerable <RawPacket>, TMat, TClosed>)flow.GroupedByCountAndRawCaptureSizeWithin <RawPacket, TMat>(
     count, rawCapturesSizeLimit, timeout);
Exemple #2
0
 public void A_Flow_must_be_covariant()
 {
     Source <IFruit, NotUsed> f1 = Source.From <IFruit>(Apples());
     IPublisher <IFruit>      p1 = Source.From <IFruit>(Apples()).RunWith(Sink.AsPublisher <IFruit>(false), Materializer);
     SubFlow <IFruit, NotUsed, IRunnableGraph <NotUsed> > f2 =
         Source.From <IFruit>(Apples()).SplitWhen(_ => true);
     SubFlow <IFruit, NotUsed, IRunnableGraph <NotUsed> > f3 =
         Source.From <IFruit>(Apples()).GroupBy(2, _ => true);
     Source <Tuple <IImmutableList <IFruit>, Source <IFruit, NotUsed> >, NotUsed> f4 =
         Source.From <IFruit>(Apples()).PrefixAndTail(1);
     SubFlow <IFruit, NotUsed, Sink <string, NotUsed> > d1 =
         Flow.Create <string>()
         .Select <string, string, IFruit, NotUsed>(_ => new Apple())
         .SplitWhen(_ => true);
     SubFlow <IFruit, NotUsed, Sink <string, NotUsed> > d2 =
         Flow.Create <string>()
         .Select <string, string, IFruit, NotUsed>(_ => new Apple())
         .GroupBy(-1, _ => 2);
     Flow <string, Tuple <IImmutableList <IFruit>, Source <IFruit, NotUsed> >, NotUsed> d3 =
         Flow.Create <string>().Select <string, string, IFruit, NotUsed>(_ => new Apple()).PrefixAndTail(1);
 }
Exemple #3
0
        private static void Add(StringBuilder builder, SubFlow subFlow, int rowNumber)
        {
            builder.AppendLine("<div class=\"subFlow" + ((rowNumber % 2 == 0) ? "" : " odd") + "\">");
            builder.AppendLine("<div class=\"name\">" + subFlow.Name + "</div>");

            int i = 1;

            foreach (SubFlowStep step in subFlow.FlowSteps)
            {
                builder.AppendLine("<div class=\"step\">");
                builder.AppendLine("<div class=\"stepName\">" + step.Label + "</div>");
                builder.AppendLine("<div class=\"images\">");
                AddSnapShots(builder, step);
                builder.AppendLine("</div>");
                builder.AppendLine("</div>");
                if (i++ != subFlow.FlowSteps.Count)
                {
                    AddTimeStamp(builder, step);
                }
            }
            builder.AppendLine("</div>");
        }
Exemple #4
0
 public static Source <(int, Source <int, NotUsed>), TMat> Lift <TMat>(this SubFlow <int, TMat, IRunnableGraph <TMat> > source, Func <int, int> key)
 {
     return
         ((Source <(int, Source <int, NotUsed>), TMat>)
Exemple #5
0
 public static Source <Source <int, NotUsed>, TMat> Lift <TMat>(this SubFlow <int, TMat, IRunnableGraph <TMat> > source)
 {
     return
         ((Source <Source <int, NotUsed>, TMat>)
          source.PrefixAndTail(0).Select(x => x.Item2).ConcatSubstream());
 }
Exemple #6
0
 public SubFlowTest()
 {
     subFlow = new SubFlow("subFlow", "flow", "archiveLocation");
 }
Exemple #7
0
 public void SetUp()
 {
     subFlow = new SubFlow("subFlow", "flow", "archiveLocation");
 }
Exemple #8
0
 public static Source <Tuple <int, Source <int, NotUsed> >, TMat> Lift <TMat>(this SubFlow <int, TMat, IRunnableGraph <TMat> > source, Func <int, int> key)
 {
     return
         ((Source <Tuple <int, Source <int, NotUsed> >, TMat>)
          source.PrefixAndTail(1).Select(p => Tuple.Create(key(p.Item1.First()), Source.Single(p.Item1.First()).Concat(p.Item2))).ConcatSubstream());
 }