public DefaultMessagingHost(IEnumerable <IChannelConnector> connectors, ChannelGroupFactory factory)
        {
            if (connectors == null)
            {
                throw new ArgumentNullException("connectors");
            }

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

            this.connectors = connectors.Where(x => x != null).ToArray();
            if (this.connectors.Count == 0)
            {
                throw new ArgumentException("No connectors provided.", "connectors");
            }

            this.factory = factory;
        }
Exemplo n.º 2
0
		public DefaultMessagingHost(IEnumerable<IChannelConnector> connectors, ChannelGroupFactory factory)
		{
			if (connectors == null)
				throw new ArgumentNullException("connectors");

			if (factory == null)
				throw new ArgumentNullException("factory");

			this.connectors = connectors.Where(x => x != null).ToArray();
			if (this.connectors.Count == 0)
				throw new ArgumentException("No connectors provided.", "connectors");

			this.factory = factory;
		}