Microsoft.Ccr.Core.MultipleItemGather.MultipleItemGather C# (CSharp) Method

MultipleItemGather() public method

public MultipleItemGather ( Type types, IPortReceive ports, int itemCount, Handler handler ) : System
types System.Type
ports IPortReceive
itemCount int
handler Handler
return System
        public MultipleItemGather(Type[] types, IPortReceive[] ports, int itemCount, Handler<ICollection[]> handler)
        {
            if (types == null)
                throw new ArgumentNullException("types");
            if (ports == null)
                throw new ArgumentNullException("ports");
            if (handler == null)
                throw new ArgumentNullException("handler");
            if (types.Length == 0)
                throw new ArgumentOutOfRangeException ("types");
            if (ports.Length == 0)
                throw new ArgumentOutOfRangeException ("ports");
            if (types.Length != ports.Length)
                throw new ArgumentOutOfRangeException ("types");

            this.types = types;
            this.ports = ports;
            this.itemCount = itemCount;
            this.handler = handler;
            this.results = new List<object>[ports.Length];
            for (int i = 0; i < ports.Length; ++i)
                this.results [i] = new List<object> ();
        }