Beispiel #1
0
        internal StageInput <R, T> NewUnconnectedInput <R, T>(Expression <Func <R, int> > partitioning)
            where T : Time <T>
        {
            if (inputsSealed)
            {
                throw new Exception("Inputs for a stage may not be added after outputs");
            }

            var result = new StageInput <R, T>(this, partitioning);

            return(result);
        }
Beispiel #2
0
        // creates a new receive port for the stage to read records from.
        public StageInput <R, T> NewInput <R, T>(Stream <R, T> stream, Expression <Func <R, int> > partitioning)
            where T : Time <T>
        {
            if (inputsSealed)
            {
                throw new Exception("Inputs for a stage may not be added after outputs");
            }

            if (stream == null)
            {
                throw new ArgumentNullException("stream");
            }

            var result = new StageInput <R, T>(this, partitioning);

            this.InternalGraphManager.Connect(stream.StageOutput, result, partitioning, Channel.Flags.None);

            return(result);
        }