private static bool GetHostConnectionData(string applicationPath, out HostConnectionData connectionData)
        {
            if (HostConnectionUtil.FindHostConnection(applicationPath, out connectionData))
            {
                return(EnsureHostServerStarted(applicationPath, ref connectionData));
            }

            connectionData = null;
            return(false);
        }
        private static bool FindAndSignalHostConnection(string applicationPath)
        {
            HostConnectionData connectionData;

            if (HostConnectionUtil.FindHostConnection(applicationPath, out connectionData))
            {
                return(HostConnectionUtil.SignalHostForStartup(connectionData, blockUntilStarted: false));
            }

            return(false);
        }
        private static bool EnsureHostServerStarted(string applicationPath, ref HostConnectionData connectionData)
        {
            if (String.IsNullOrEmpty(connectionData.ConnectionString))
            {
                if (!HostConnectionUtil.SignalHostForStartup(connectionData))
                {
                    return(false);
                }

                if (!HostConnectionUtil.FindHostConnection(applicationPath, out connectionData))
                {
                    return(false);
                }

                if (String.IsNullOrEmpty(connectionData.ConnectionString))
                {
                    return(false);
                }
            }

            return(true);
        }