public static MultipleItemReceiver MultipleItemReceive <T>(VariableArgumentHandler <T> handler, params Port <T>[] ports) { if (ports == null) { throw new ArgumentNullException("ports"); } if (ports.Length == 0) { throw new ArgumentOutOfRangeException("ports"); } return(new MultipleItemReceiver(new VariableArgumentTask <T>(ports.Length, handler), (IPortReceive[])ports)); }
public VariableArgumentTask(int varArgSize, VariableArgumentHandler <T> handler) { _Handler = handler; _aParams = new IPortElement[varArgSize]; }
public static JoinSinglePortReceiver MultipleItemReceive <T>(bool persist, Port <T> port, int itemCount, VariableArgumentHandler <T> handler) { return(new JoinSinglePortReceiver(persist, new VariableArgumentTask <T>(itemCount, handler), port, itemCount)); }
public static JoinReceiver MultiplePortReceive <T>(bool persist, Port <T>[] ports, VariableArgumentHandler <T> handler) { return(new JoinReceiver(persist, new VariableArgumentTask <T>(ports.Length, handler), (IPortReceive[])ports)); }
public static JoinSinglePortReceiver Join <T0>(this Port <T0> port, int itemCount, VariableArgumentHandler <T0> handler) { return(new JoinSinglePortReceiver(false, new VariableArgumentTask <T0>(itemCount, handler), port, itemCount)); }