/// <summary>
        /// Get broker node binding
        /// </summary>
        /// <param name="connectionInfo"></param>
        /// <returns></returns>
        public static Binding GetBrokerBinding(this IConnectionInfo connectionInfo)
        {
#if HPCPACK
            var scheme = connectionInfo.TransportScheme;
#if API
            if (LocalSession.LocalBroker)
            {
                return(new NetNamedPipeBinding(NetNamedPipeSecurityMode.Transport));
            }
#endif
            if ((scheme & TransportScheme.NetTcp) == TransportScheme.NetTcp)
            {
                Binding binding;
                try
                {
                    binding = new NetTcpBinding(BindingHelper.LauncherNetTcpBindingName);
                }
                catch (KeyNotFoundException)
                {
                    binding = connectionInfo.DefaultBrokerLauncherNetTcpBinding();
                }
                return(binding);
            }
#if !net40
            else if ((scheme & TransportScheme.NetHttp) == TransportScheme.NetHttp)
            {
                Binding binding;
                try
                {
                    binding = new NetTcpBinding(BindingHelper.LauncherNetHttpBindingName);
                }
                catch (KeyNotFoundException)
                {
                    binding = BindingHelper.HardCodedBrokerLauncherNetHttpsBinding;
                }
                return(binding);
            }
#endif
            else if ((scheme & TransportScheme.Http) == TransportScheme.Http)
            {
                Binding binding;
                try
                {
                    binding = new BasicHttpBinding(BindingHelper.LauncherHttpBindingName);
                }
                catch (KeyNotFoundException)
                {
                    binding = BindingHelper.HardCodedBrokerLauncherHttpsBinding;
                }
                return(binding);
            }
            else if ((scheme & TransportScheme.Custom) == TransportScheme.Custom)
            {
                return(BindingHelper.HardCodedBrokerLauncherNetTcpBinding);
            }
            else
            {
                return(BindingHelper.HardCodedBrokerLauncherNetTcpBinding);
            }
#else
            return(BindingHelper.HardCodedUnSecureNetTcpBinding);
#endif
        }