private IEnumerable <IAppConnection> GetOnlineConnections(GetConnectionsRequest request)
        {
            var connectionId = request.ConnectionId.ToUniqueId();

            if (connectionId != UniqueId.Empty)
            {
                if (_appLifecycleManager.TryGetOnlineConnection(connectionId, out var connectionInfo))
                {
                    return(new[] { connectionInfo });
                }
                return(Enumerable.Empty <IAppConnection>());
            }

            var appId         = request.ApplicationId;
            var appInstanceId = request.AppInstanceId.ToUniqueId();

            if (appInstanceId != UniqueId.Empty)
            {
                if (!string.IsNullOrEmpty(appId))
                {
                    if (_appLifecycleManager.TryGetOnlineConnection(appInstanceId, appId, out var connection))
                    {
                        return(new[] { connection });
                    }
                }
                return(_appLifecycleManager.GetAppInstanceConnections(appInstanceId));
            }

            if (!string.IsNullOrEmpty(appId))
            {
                return(_appLifecycleManager.GetAppConnections(appId));
            }

            return(_appLifecycleManager.GetOnlineConnections());
        }