Beispiel #1
0
        // ========= PUBLIC METHODS ====================================================================================

        /// <summary>
        /// Returns an instance
        /// </summary>
        /// <returns>The client.</returns>
        public static T BuildClient(string host, int port)
        {
            T client = _pool.AcquireResource();

            if (client != null)
            {
                client.Setup(host, port);
            }
            else
            {
                throw new Exception("Impossible to Acquire Resource");
            }

            return(client);
        }