Esempio n. 1
0
        /// <summary>
        /// Add a client to the pool.
        /// </summary>
        public virtual bool AddClient(SuperPoolClient client)
        {
            IMessageBus messageBus = _messageBus;

            if (messageBus == null)
            {
                return(false);
            }

            if (client.Source == null)
            {// TODO: clear this scenario.
             //System.Diagnostics.Debug.Fail("Warning, adding a client with no source assigned. Make sure to assign source prior to adding client.");
            }

            bool result = messageBus.AddClient(client);

            if (result)
            {
                client.AssignSuperPool((SuperPool)this);
            }

            return(result);
        }