Beispiel #1
0
 public ProcessColumn(int column, IEnumerableExpression <ProcessWell> wells)
 {
     Column         = column;
     Samples        = wells;
     AllSamples     = wells.Select(w => w.Sample);
     AnyValidSample = _anyNonErrorSample.Observe(this);
     AnyValidSample.Successors.SetDummy();
 }
        public void InitializeContext(IEnumerableExpression <ISample> samples, ISynchronizationContext context)
        {
            context.Data.Add(_platesKey, samples
                             .ChunkIndexed(8, (samples, column) => new ProcessColumn(column, samples.Select(tuple => new ProcessWell(tuple.Item2 % 96, tuple.Item1))))
                             .Chunk(12, (columns, plateIndex) => new ProcessPlate($"Plate{plateIndex+1:00}", columns))
                             .AsNotifiable());

            context.Data.Add(_tubesKey, samples
                             .ChunkIndexed(16, (samples, tubeIndex) => new Tubes($"Tube{tubeIndex+1:00}", samples.Select(tuple => new ProcessWell(tuple.Item2 % 16, tuple.Item1))))
                             .AsNotifiable());
        }