Esempio n. 1
0
 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));
 }
Esempio n. 2
0
 public VariableArgumentTask(int varArgSize, VariableArgumentHandler <T> handler)
 {
     _Handler = handler;
     _aParams = new IPortElement[varArgSize];
 }
Esempio n. 3
0
 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));
 }
Esempio n. 4
0
 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));
 }
Esempio n. 5
0
 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));
 }