Beispiel #1
0
        internal ZmqPollSet(IEnumerable<IPollItem> pollItems, IPollSetProxy proxy, IErrorProviderProxy errorProviderProxy)
        {
            if (pollItems == null)
            {
                throw new ArgumentNullException("pollItems");
            }

            if (!pollItems.Any())
            {
                throw new ArgumentException("At least one poll item is required.", "pollItems");
            }

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

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

            this.pollItems = pollItems.ToArray();
            this.proxy = proxy;
            this.errorProvider = new ZmqErrorProvider(errorProviderProxy);
        }
Beispiel #2
0
        internal ZmqSocket(ISocketProxy socketProxy, IErrorProviderProxy errorProviderProxy)
        {
            if (socketProxy == null)
            {
                throw new ArgumentNullException("socketProxy");
            }

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

            this.proxy = socketProxy;
            this.errorProvider = new ZmqErrorProvider(errorProviderProxy);
        }